* dialect/sql/builder: make sql.NotIn() with empty args fallback to False()
This is basically the identical change to #2735, but for NotIn().
This bug currently prevents anyone using NotIn() from upgrading from v0.10.x to v0.11.x
* Update go.sum
untidy
* feedback
* dialect/sql/builder: make sql.In() with empty args fallback to False()
* fix indent
* added comment
* remove the equilvalent logic in the codegen side
* comment fix, run go generate
* type safe feature activation in example
* Update doc/md/versioned-migrations.md
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
Also, added additional example where an edge schema has another edge
to a type that holds an information about the relationship.
The only reason this example exists is to allow users to reduce the storage
occupied by the join-table and allow connect (via M2O) multiple edge-schemas
to an 'information'/'description' node.
* Fix problem when model maps integer id to a GoType
* Update generated files
* apply suggestions from code review
* Update generated files
* Update generated files after merge from master
* Cleanup test code in integration
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
* Modify integration test IntSID.
Wrapped tests of IntSID for avoid conflicts.
* Modify tests in integrations
Order of tests was changed. As a result, if-statement for difference in RDB is deleted.
+ force pushing same commit to invoke ci.
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
* Add docs on using ExprP() for custom WHERE sql statement
* Add ExprP() examples using integration test
* move custom predicate example and show examples using both P() and ExprP()
* fix to greater or equal than
* rephrase wording and fix sql builder
* Update doc/md/predicates.md
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
* Update doc/md/predicates.md
* Update doc/md/predicates.md
* Update doc/md/predicates.md
* Update doc/md/predicates.md
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
* dialect/sql/schema: file based type store
This PR adds support for a file based type storage when using versioned migrations. The file called `.ent_types` is written to the migration directory alongside the migration files and will be kept in sync for every migration file generation run.
In order to not break existing code, where the type storage might differ for different deployment, global unique ID mut be enabled by using a new option. This will also be raised as an error to the user when attempting to use versioned migrations and global unique ID.
Documentation will be added to this PR once feedback on the code is gathered.
* apply CR
* fix tests
* change format of types file to exclude it from atlas.sum file
* docs and drift test
* apply CR