Repository navigation
Laravel names, insertGetId, insertMany, toRawSql, schema helpers and low fixes - #42
Merged
Merged
Conversation
Contributor
Author
Bot reviewBlocking
Non-blocking
Checked and OK
Tests (local)
|
…rs; fix low ORM nits - first, doesntExist, unless, whenValue, whereNot with a column - insertGetId and insertMany (no RETURNING) - toRawSql with quoted values - schema: foreignIdFor, ulid, foreignUlid, year, ipAddress, softDeletesTz, nullableMorphs, uuidMorphs, drop helpers, dropPrimary, renameIndex, fullText, nullOnUpdate, restrictOnUpdate - save keeps a user-set updated_at; update sets updatedAt for a custom column - logRedact of a named connection is used - find on a union fails in the Future; union guard test split - guarded check without tableColumns drops non-ASCII keys, with a test - many to many delete check counts rows, tests for more than 100 ids
…the Future update(), touch(), delete() and restore() set updatedAt, but a custom updated_at column that setColumnValue() does not take was not saved in _savedValues. The next save() then saw a changed time and kept the old one.
necessarylion
force-pushed
the
low-fixes
branch
from
November 6, 2026 06:11
c70f1e1 to
1ad904d
Compare
Contributor
Author
Fixer reply
Tests run locally: SQLite 591 passed, Postgres 16 580 passed, MariaDB 11 589 passed, MySQL 8.4 589 passed. |
Contributor
Author
Bot reviewResult: no blocking problems.
Checks: Non-blocking: CHANGELOG has a few near-duplicate lines (two about CI: lint passed. The test job (PG and MySQL) was still running when I checked. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Low items from todo.md for dox-orm. No breaking changes. No version bump.
blog.update({...})with a time for a customupdated_atcolumn did not setupdatedAt. Now it does.song_idtext, then integer) between test files. The full Postgres run passed here, so I could not reproduce it.find()on a union threw before it returned a Future, butfindOrFail()failed inside the Future. Nowfind()fails inside the Future too. The big union test is split, one test per guard.logRedactwas read only from the default connection. A query on a named connection now also hides the names in that connection'slogRedact.save()always replaced a user-setupdated_atwith now. Now it keeps the user's value, like Laravel.insertGetId(data)(returns the new id) andinsertMany(rows)(bulk insert, no RETURNING, returns true). On a model, both usefillable.insert()anddelete()return the same types as before.toRawSql(). It puts the values in the SQL with quotes for the database. It uses the schema grammarliteral().toSql()works as before.first(),doesntExist(),unless(),whenValue(value, (q, value) {...}), andwhereNot/orWhereNotwith a column and value. Skippedexists(): a model already has the getterexists. Skippedvalue():valueis a common column name, and a model field can not share a name with a query method.hasRows()andvalueOf()stay.foreignIdFor,ulid,foreignUlid,year,ipAddress,softDeletesTz,nullableMorphs,uuidMorphs,dropTimestamps,dropSoftDeletes,dropConstrainedForeignId,dropPrimary,renameIndex,fullText,nullOnUpdateandrestrictOnUpdate. These live in dox-orm (lib/src/schema), not in dox_migration. SQLite can not dofullTextordropPrimary, so they throwUnsupportedErrorthere. On SQLite,renameIndexmakes the index again, anddropConstrainedForeignIddrops the column after the table rebuild.tableColumns, so the normalized guarded check now has a test. In that mode a key with non-ASCII chars is dropped, because MySQL folds case for more chars than Dart. Not tested on real data, but the full MySQL 8.4 and MariaDB runs pass.Tests run locally: SQLite 588 passed, Postgres 16 577 passed, MariaDB 11 586 passed, MySQL 8.4 586 passed, dox-migration 72 passed (MariaDB and MySQL 8.4). Time zone files pass on all three drivers.
dart analyze --fatal-infosanddart formatare clean.