Skip to content

maktouch/kysely-bigquery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@maktouch/kysely-bigquery

Kysely adapter for BigQuery.

npm i @google-cloud/bigquery @maktouch/kysely-bigquery

This project was largely adapted from kysely-planetscale.

Usage

Pass your BigQuery connection options, a BigQuery instance, a Dataset instance, or a Table instance into the dialect in order to configure the Kysely client. Follow these docs for instructions on how to do so.

import { Kysely } from 'kysely';
import { BigQueryDialect } from '@maktouch/kysely-bigquery';

interface SomeTable {
  key: string;
  value: string;
}

interface Database {
  some_datasets.some_table: SomeTable
}

// Let BigQueryDialect create the BiqQuery instance:
const options: BigQueryOptions = ...;
const db = new Kysely<Database>({ dialect: new BigQueryDialect({ options }) });

// Or pass in an existing instance
const bigquery: BigQuery | Dataset | Table = ...;
const db = new Kysely<Database>({ dialect: new BigQueryDialect({ bigquery }) });

About

BigQuery Dialect and Introspection for Kysely

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors