Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/kysely_postgrs_js_dialect/deps.ts

Kysely dialect for PostgreSQL using the Postgres.js client.
Go to Latest
import * as kyselyPostgrsJsDialect from "https://deno.land/x/kysely_postgrs_js_dialect@v0.27.4/deps.ts";

Classes

The main Kysely class.

AggregateFunctionBuilder with an alias. The result of calling AggregateFunctionBuilder.as.

Allows us to force consumers to do exactly one alteration to a column.

This builder can be used to create a alter table query.

A plugin that converts snake_case identifiers in the database into camelCase in the javascript side.

This builder can be used to create a create table query.

Plugin that removes duplicate joins from queries.

A basic implementation of DialectAdapter with sensible default values. 3rd party dialects can extend this instead of implementing the DialectAdapter interface from scratch. That way all new settings will get default values when they are added and there will be less breaking changes.

A driver that does absolutely nothing.

Reads all migrations from a folder in node.js.

The result of an insert query.

The main Kysely class.

A class for running migrations.

MS SQL Server dialect that uses the tedious library.

MySQL dialect that uses the mysql2 library.

A QueryExecutor subclass that can be used when you don't have a QueryCompiler, ConnectionProvider or any other needed things to actually execute queries.

Transforms an operation node tree into another one.

Parses JSON strings in query results into JSON objects.

PostgreSQL dialect that uses the pg library.

Provides methods for building database schema.

SQLite dialect that uses the better-sqlite3 library.

Variables

Interfaces

A single connection to the database engine.

An interface for getting the database metadata (names of the tables and columns etc.)

A Dialect is the glue between Kysely and the underlying database engine.

A DialectAdapter encapsulates all differences between dialects outside of Driver and QueryCompiler.

A Driver creates and releases DatabaseConnection | database connections and is also responsible for connection pooling (if the dialect supports pooling).

An expression with an as method.

A type that holds an expression and an alias for it.

RawBuilder with an alias. The result of calling RawBuilder.as.

A single connection to the database engine.

An interface for getting the database metadata (names of the tables and columns etc.)

A Dialect is the glue between Kysely and the underlying database engine.

A DialectAdapter encapsulates all differences between dialects outside of Driver and QueryCompiler.

A Driver creates and releases DatabaseConnection | database connections and is also responsible for connection pooling (if the dialect supports pooling).

Expression represents an arbitrary SQL expression with a type.

Helpers for type safe SQL function calls.

All migration methods (Migrator.migrateTo | migrateTo, Migrator.migrateToLatest | migrateToLatest etc.) never throw but return this object instead.

Config for the MySQL dialect.

This interface is the subset of mysql2 driver's Pool class that kysely needs.

Type for the NO_MIGRATIONS constant. Never create one of these.

Config for the PostgreSQL dialect.

This interface is the subset of pg driver's Pool class that kysely needs.

This node is basically just a performance optimization over the normal ValueListNode. The queries often contain large arrays of primitive values (for example in a where in list) and we don't want to create a ValueNode for each item in those lists.

a QueryCompiler compiles a query expressed as a tree of OperationNodes into SQL.

This interface abstracts away the details of how to compile a query into SQL and execute it. Instead of passing around all those details, SelectQueryBuilder and other classes that execute queries can just pass around and instance of QueryExecutor.

An instance of this class can be used to create raw SQL snippets or queries.

This interface is the subset of better-sqlite3 driver's Database class that kysely needs.

Config for the SQLite dialect.

a QueryCompiler compiles a query expressed as a tree of OperationNodes into SQL.

Type Aliases

Just like AnyColumn but with a as <string> suffix.

Just like AnyColumnWithTable but with a as <string> suffix.

Given a database type and a union of table names in that db, returns a union type with all possible column names.

Given a database type and a union of table names in that db, returns a union type with all possible table.column combinations.

Turns a SelectCallback into a selection object.

This type can be used to specify a different type for select, insert and update operations.

Evaluates to true if the types T and U are equal.

A shortcut for defining database-generated columns. The type is the same for all selects, inserts and updates but the column is optional for inserts and updates.

A shortcut for defining columns that are only database-generated (like postgres GENERATED ALWAYS AS IDENTITY). No insert/update is allowed.

A helper type that allows inferring a select/insert/update/delete query's result type from a query builder or compiled query.

Given a table interface, extracts the insert type from all ColumnType types.

A shortcut for defining JSON columns, which are by default inserted/updated as stringified JSON strings.

Keys of R whose InsertType values can't be null or undefined.

A type constant for marking a column as not null. Can be used with $narrowPartial.

Makes all properties of object type T nullable.

Keys of R whose InsertType values can be null or undefined.

Like Expression<V> but also accepts a select query with an output type extending Record<string, V>. This type is useful because SQL treats records with a single column as single values.

Given a table interface, extracts the select type from all ColumnType types.

Turns a SelectExpression or a union of them into a selection object.

Represents a database row whose column names and their types are unknown.

Given a table interface, extracts the update type from all ColumnType types.

Keys of R whose UpdateType values are not never