laconic_postgresql 2.0.0
laconic_postgresql: ^2.0.0 copied to clipboard
PostgreSQL driver for the Laconic query builder.
2.0.0 #
1.3.1 #
Bug Fixes #
whereTimeinvalid SQL — FixedCAST()expression missing closing parenthesis and type specifier; now usescol::timesyntaxwhereDay/whereMonth/whereYearinvalid SQL — FixedEXTRACT()expressions missing closing parenthesis- Refactored
_dateFunction→_dateExpression(column)to return complete SQL expressions
Performance #
_convertPlaceholdersfast-path — AddedString.contains('?')check before regex matching, eliminating unnecessary regex evaluation for Grammar-generated$NSQL
1.3.0 #
Features #
- New Grammar Methods:
compileTruncate(),compileInsertOrIgnore(),compileUpsert()— supports new core laconic v2.3.0 features - Support for
dateWHERE type:whereDate(),whereTime(),whereDay(),whereMonth(),whereYear()— uses PostgreSQL'sDATE(),col::time, andEXTRACT()functions - Support for
existsWHERE type:whereExists()/whereNotExists()— EXISTS subqueries in WHERE and JOIN conditions, with automatic$Nplaceholder offset in subqueries - Support for
locks:lockForUpdate()compiles toFOR UPDATE;sharedLock()compiles toFOR SHARE - Upsert:
upsert()compiles toINSERT INTO ... ON CONFLICT(...) DO UPDATE SET - Insert Or Ignore:
insertOrIgnore()compiles toINSERT INTO ... ON CONFLICT DO NOTHING
Performance #
- Pre-compiled RegExp —
_positionalParamREis nowstatic final, avoiding re-compilation on every query - Prepared Statement Caching — Frequently used parameterized queries now reuse cached prepared statements (up to 50), eliminating the Parse → Close round-trip on repeated executions
Bug Fixes #
- More Robust
_compileRawSql— UsesindexOfto explicitly locate?before replacement, avoiding issues with?characters inside raw SQL string literals (edge case)
Improvements #
- Alignment with laconic v2.3.0: Compile-time compatibility with new
SqlGrammarabstract methods and updatedcompileSelectsignature
1.2.0 #
Refactoring #
- Improve Transaction Handling - Replace individual connection management with
runZonedfor transaction context isolation - Simplify Query Execution - Refactor query execution into dedicated
_executeQuerymethods with protocol-based selection, remove placeholder conversion duplication
1.1.0 #
Features #
- Implement
compileIncrement()/compileDecrement()- Grammar methods for increment/decrement SQL generation with$Npositional placeholders - JoinClause BETWEEN Support - Add
betweenandbetweenColumnstype handling in_compileJoinConditions()
Bug Fixes #
- Fix Transaction Isolation - Store
_transactionSessionto ensure all queries within a transaction use the same session
1.0.1 #
Improvements #
- Grammar Singleton -
PostgresqlGrammaris now a static singleton instance, avoiding unnecessary allocations on each access - Enhanced Exception Handling - All catch blocks now preserve the original exception
causeandstackTraceinLaconicException
1.0.0 #
Initial release of the PostgreSQL driver for Laconic query builder.
Features #
- PostgreSQL database driver using
postgrespackage with connection pooling (max 10) $Npositional parameter support (extended query protocol)RETURNINGclause forinsertGetId()_convertPlaceholders()safety net for?→$Nconversion- Transaction support using
runZonedfor session isolation - Lazy connection pool initialization
- SSL support via
PostgresqlConfig.useSsl