GitHub

API reference for sql.

SQL (Effect's effect/sql): statements built from string literals with bound parameters, a client with transactions, batched resolvers, schema-typed queries, migrations, and a SQLite driver on sqlite3. The PostgreSQL driver, pyfect.sql.pg on psycopg 3, is the pyfect-dev[pg] extra and is not imported here, as are mysql, mssql, libsql (libSQL and Turso), clickhouse and d1 (Cloudflare D1).

  • statement: fragments, helpers and compilers
  • client: SqlClient and make for drivers
  • connection: what a driver implements
  • error: SqlError and its reasons
  • resolver: batched requests (SqlResolver)
  • schema: queries typed by schemas (SqlSchema)
  • stream: streams from drivers that push rows (SqlStream)
  • migrator: migrations
  • model: repositories of pyfect.schema.model classes (SqlModel)
  • sqlite: the SQLite client (pyfect.sql.sqlite.migrator runs its migrations)

Re-exports

Modules