queryflow 0.8.0
queryflow: ^0.8.0 copied to clipboard
Queryflow is a lightweight and flexible Query Builder designed to simplify the process of building and executing SQL queries to MySQL and PostgreSQL.
0.8.0 #
- Schema synchronization now reconciles
TypeEnumvalues on existing columns (adding a value to the model used to leave the database enum stale, because sync only added/dropped columns)- MySQL: compares
INFORMATION_SCHEMA.COLUMNS.COLUMN_TYPEand runsALTER TABLE ... MODIFY COLUMNwhen the values differ. Labels are compared exactly, so a case-only difference is applied too (a case-sensitive collation would otherwise keep rejecting the model spelling) - PostgreSQL: replaces the generated
CHECKconstraint (enums areTEXT). The constraint is matched throughpg_constraint.conkey/pg_attribute(never by text), only standalone single-column enum predicates are replaced, and the drop/add happens in oneALTER TABLEstatement so a failing newCHECKleaves the old one in place - New
synchronize(syncEnumValues: false)opt-out for large tables where theALTERshould be scheduled
- MySQL: compares
TableSyncronizernow also readsDATA_TYPE/COLUMN_TYPEfromINFORMATION_SCHEMA- Unit tests for MySQL and PostgreSQL enum reconciliation (no database needed)
0.7.0 #
- Upgrade
mysql_dartfrom1.2.1to3.0.3 - BREAKING: require Dart
>=3.6.0(minimum supported bymysql_dart 3.x) - MySQL driver improvements: MySQL 9 /
caching_sha2_passwordsupport, JSON columns, safer prepared-statement handling, FIFO concurrency on a single connection, faster packet/result decoding, and better reconnect handling - Compatible with the removal of
MySQLConnectionPool.prepare; pooled prepared statements continue to run insidewithConnection - Zero dates (
0000-00-00) are returned asnullby default instead of an invalid rolled-overDateTime - No public Queryflow API changes
0.6.0 #
- Fix
UPDATEignoring everyWHEREcondition after the first one - Fix
DELETEconcatenating conditions withoutAND/ORand losingOR - Implement
notWherenegation for everyWhereMatcher - Translate
Equals(null)/Different(null)toIS NULL/IS NOT NULL Innow accepts any value type and rejects empty listsUPDATEno longer hardcodes theidcolumn as the primary keyINSERTnow quotes column names and uses dialect placeholdersexecuteTransationkeeps type adapters, schema definitions and loggerMySqlExecutor.executeTransationno longer requires a previous query- Nested transactions now fail with a clear
UnsupportedError insertModelcan run inside a transaction without opening a nested one- Fix schema synchronization on PostgreSQL (
INFORMATION_SCHEMAcasing) - Fix foreign key constraints when adding columns during synchronization
- Fix
initalDatainserts on PostgreSQL (auto increment and placeholders) TypeEnumusesTEXT+CHECKon PostgreSQL instead of an invalidENUM- Synchronization errors are no longer swallowed
- Views are dropped before their tables when
dropTableis used - View synchronization uses the correct schema on PostgreSQL
dropObsoleteColumnsis now opt-in to avoid accidental data losscolumnDefinitionnow preserves nullability, defaults and constraints whencolumnDefinitionnow preserves nullability, defaults and constraints when adding columns- PostgreSQL executors accept
?placeholders in pooled connections and inside transactions; the conversion skips quoted strings and dollar-quoted blocks - MySQL pooled prepared statements now run on the same connection that prepared them
close()is idempotent and connections/pools can be reused after closing- PostgreSQL no longer runs
SELECT 1before every query when reusing a healthy connection insert()now returns the inserted primary key: usesINSERT ... RETURNINGon PostgreSQL, honors explicitly provided keys and accepts aprimaryKeyparameter for tables whose key is notid- Add
executeTransactionandsynchronize;executeTransation/syncronizeare deprecated aliases - Logging is silent by default; pass
debug: trueto enable query logs - Use
lintsinstead offlutter_lints, pin thetestdependency and update CI to run with the Dart SDK - Add professional documentation at https://docs.page/RafaelBarbosatec/queryflow
0.5.2 #
- Fix quotedFields
0.5.1 #
- Improve foreign key constraint name generation to avoid overly long identifiers
- Adds Unique property in foreign key
0.5.0 #
- Adds postgresql support
- BREAKING-CHANGE: New constructor. now use Queryflow.mysql() or Queryflow.postgresql()
- Simplify 'executeTransation'
0.4.0 #
- Adds Event Synchronizer
0.3.7 #
- update default values in TableModel tests to use correct types
0.3.6 #
- Adds
deleteModel. - deallocate PreparedStmt from insert transactions
0.3.5 #
- Log improvements
- fix FOREIGN KEY key name
0.3.4 #
- fix max_prepared_stmt_count error
0.3.3 #
- Rename params
isNullblaetoisNotNull
0.3.2 #
- Sync view improvements. Adds
ViewModel.rawandViewModel.builder
0.3.1 #
- Fix View sync.
0.3.0 #
- Adds View syncronizer
- Adds
IsNullandIsNotNull - Adds
onUpdatein tablecolumn
0.2.8 #
- Flix
limitbug
0.2.7 #
- Able
limitafterorderBy
0.2.5 #
- Adds
fetchAsOnemethod. - Fix show count method
0.2.4 #
- Adds
fetchOnemethod.
0.2.3 #
- Adds
deletemethod. - Adds
Group by
0.2.2 #
- Adds
TypeAdapter.
0.2.1 #
- Adds
aliasinjoinmethod.
0.2.0 #
- Adds TableModel. By using TableModel, you can manage your database schema directly in your Dart code, ensuring consistency and reducing the need for manual SQL scripts.
- Adds support to Pool of connections
0.1.1 #
- Adds example
0.1.0 #
- Adds
executeTransation - Adds
insertModel,updateModelansselectModelinQueryflow
0.0.1 #
- Initial version