16 Commits

Author SHA1 Message Date
6e865b733d
implement more bug fixes and improvements for populating deeply nested refs 2025-04-11 23:05:14 -04:00
4de1c20938
THIS DOESN'T WORK.
but i need to commit
2025-04-06 17:41:00 -04:00
11d31fbbc1
improve Save api
add a `SaveWith` function that accepts `SaveOptions` as a parameter, letting you tweak things like whether timestamps will be set before an insert or update operation
2025-03-27 00:12:19 -04:00
bb37212be7
fix doSave calls to check if the document's ID is a zero value 2025-03-26 23:38:19 -04:00
8c559d5926
upgrade mongodb driver to 2.0 (may revert) 2024-09-19 19:55:36 -04:00
15d032459a
remove tons of commented-out code, general cleanup 2024-09-14 15:47:17 -04:00
9d791b1e3d
externalize more panic/error strings 2024-09-14 15:20:17 -04:00
fcd7cb2013
overhaul models to be more sensible by separating "instance" logic into a separate Document type 🪷 2024-09-14 02:09:38 -04:00
e018dad91e
update getNested utility to better handle slice fields 2024-09-12 17:50:31 -04:00
26101760cc
externalize error formats + strings 2024-09-12 17:22:42 -04:00
551d06fbe0
update getNested utility to better handle slice fields 2024-09-12 17:15:04 -04:00
fefa695063
some changes
- move internal model helper funcs into model_internals.go
- add Swap method to Model
- modify `getNested` util to support indexing slice fields such as `Abc[0].Def`
2024-09-05 13:57:35 -04:00
924b3fc9d2
many additions!
- add support for `autoinc` struct tag
- add Pull method to Model
- add utility func to increment a value of an unknown type by 1
- idcounter.go no longer increments the counter value (it is now up to the caller to increment the returned value themselves)
2024-09-04 19:43:12 -04:00
f721b32e01
refactor some things, add Delete method, improve Save method 2024-09-03 00:14:12 -04:00
3f8fded6e5
add a new Append method to Model, handle misc errors, unexport some funcs + methods 2024-09-02 19:39:23 -04:00
f46aab2f5f
hello world! 🌸 2024-09-01 16:17:48 -04:00