laconic_postgresql 1.2.0
laconic_postgresql: ^1.2.0 copied to clipboard
PostgreSQL driver for the Laconic query builder.
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 #
-
PostgresqlDriver- PostgreSQL database driver implementingDatabaseDriverinterface- Connection pooling with configurable max connections (default: 10)
- Automatic
?to$1, $2, ...parameter placeholder conversion RETURNING idclause support forinsertGetId()- SSL connection support
- Transaction support
- Proper connection pool cleanup on close
-
PostgresqlGrammar- PostgreSQL-specific SQL grammar extendingSqlGrammar- PostgreSQL-specific syntax compilation
$1, $2, ...positional parameter bindingRETURNINGclause for insert operations
-
PostgresqlConfig- Configuration class for PostgreSQL connectionshost- Database server host (default:localhost)port- Database server port (default:5432)database- Database name (required)username- Database username (default:postgres)password- Database password (required)useSsl- Use SSL connection (default:false)
Usage #
import 'package:laconic/laconic.dart';
import 'package:laconic_postgresql/laconic_postgresql.dart';
final laconic = Laconic(PostgresqlDriver(PostgresqlConfig(
database: 'database',
password: 'password',
)));
final users = await laconic.table('users').get();
await laconic.close();
Dependencies #
laconic: ^2.0.0postgres: ^3.5.4