Releases: dgraph-io/dgdao
Release list
v0.9.0
Breaking API redesign of the client and transaction surface.
- breaking: rename
TxnContext->TxnandNewTxnContext->NewTxn - breaking:
InTxnnow returns an exported, curated*ClientTxn(was the interface-typedClient): a transaction-scoped client that carries only record data-ops. Connection lifecycle (Close,WithRetry, schema and drop operations) and transaction entry (NewTxn,InTxn) are absent rather than hidden, so starting a transaction from within a transaction is unrepresentable at the type level. A package-levelInTxn(tx *Txn) *ClientTxnis the sole constructor;Client.InTxndelegates to it - feat: add
ClientCore, the narrow record data-ops interface (Get,Insert,Upsert,Update,Delete,GetOrInsert,GetAndDelete,Query,QueryRaw) satisfied by both the connectionClientand*ClientTxn;Clientembeds it, andtyped.Client[T],typed.Query[T], andtyped.MultiQuery[T]bind to it so one typed client serves both the connection and transaction modes - breaking: rename
LoadOrStore->GetOrInsertandLoadAndDelete->GetAndDeleteacross the untyped and typed clients, with docs that lead with the operation, the single-winner concurrency contract, and the use cases (idempotent creation; single-use token consume); thecf. sync.Maplineage notes remain - breaking: typed
Client[T].Add->Insert; typed clients gainQueryRawand dropIter(iterate viaQuery(ctx).IterNodes()) andNewTxnContext(transaction entry is a connection-client concern) - breaking: delete the vestigial
InsertRaw(identical toInsertsince the unique-check unification) and the load-testRAW_INSERTmode built on it - breaking: fold the generated-wrapper base into core as
Entity[R]/AsEntity/Record();UnwrapSchema->AsRecord, probingRecord(); theSchemamarker interface ->Record(RecordTypeName)
v0.8.0
Adds a transaction-scoped client: Client.InTxn(tx) and typed.Client[T].InTxn(tx) return clients whose full surface runs inside a caller-managed transaction (reads join the read-set; writes stage; commit via tx.Commit()), plus typed.Client[T].NewTxnContext. A typed WhereEdge query built via InTxn runs its edge pre-pass in the same transaction. BREAKING: v0.7.0's TxnContext.Insert/Upsert/Update are removed — those Client-level writes now live on the scoped InTxn client; TxnContext keeps lifecycle + graph primitives (DeleteEdge/DeleteNode/DeletePredicate). See CHANGELOG.
v0.7.0
Adds Client.NewTxnContext — a validated, deferred-commit read-write transaction for multi-mutation atomic writes (Upsert/Update/Insert/DeleteEdge/DeleteNode/DeletePredicate), with the same validation and unique-error handling as the single-shot methods. See CHANGELOG.md.
v0.6.1
What's Changed
- feat: cache the per-write schema check by @matthewmcneely in #6
Full Changelog: v0.6.0...v0.6.1
v0.6.0
What's new
- feat:
Defaulterhook — dgdao now callsApplyDefaults(ctx)on the model before validation inInsert,Upsert,Update, andLoadOrStore(notLoadAndDelete), so a model can populate default field values before a write. Because it runs before validation, a defaulted field can satisfy avalidate:"required"rule. Applies per-element across slices for batch writes.
Purely additive — models that don't implement Defaulter are unaffected. See DEFAULTER.md.
v0.5.4
v0.5.3
What's Changed
- chore: rename modusgraph to dgdao by @matthewmcneely in #1
- Chore/rename alias mg to dg by @matthewmcneely in #2
New Contributors
- @matthewmcneely made their first contribution in #1
Full Changelog: v0.5.2...v0.5.3