laconic_postgresql 1.0.0
laconic_postgresql: ^1.0.0 copied to clipboard
PostgreSQL driver for the Laconic query builder.
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