Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xata.io/kysely

Package Overview
Dependencies
Maintainers
3
Versions
1351
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xata.io/kysely - npm Package Compare versions

Comparing version 0.0.0-alpha.vefeaf45 to 0.0.0-alpha.vf4e39e6

13

CHANGELOG.md
# @xata.io/kysely
## 0.0.0-alpha.vefeaf45
## 0.0.0-alpha.vf4e39e6
### Patch Changes
- Updated dependencies [[`a303a6e5`](https://github.com/xataio/client-ts/commit/a303a6e59a5c61982e55932583a4201f444def41)]:
- @xata.io/client@0.0.0-alpha.vefeaf45
- Updated dependencies []:
- @xata.io/client@0.0.0-alpha.vf4e39e6
## 0.1.1
### Patch Changes
- Updated dependencies [[`922e6e54`](https://github.com/xataio/client-ts/commit/922e6e54e8b31641770a36b6b4ff8f4fa65d304d), [`13f6f3e4`](https://github.com/xataio/client-ts/commit/13f6f3e4b1a2f925d50a5380b62ef1057f5c3893), [`f02fc165`](https://github.com/xataio/client-ts/commit/f02fc165bf6558e4377eb9f8e1d0f4222f004c70)]:
- @xata.io/client@0.26.1
## 0.1.0

@@ -11,0 +18,0 @@

@@ -1,12 +0,43 @@

import { XataRecord, XataPlugin, XataPluginOptions, EditableData } from '@xata.io/client';
import { Kysely } from 'kysely';
import { SQLPluginResult, XataRecord, XataPlugin, XataPluginOptions, EditableData } from '@xata.io/client';
import { Dialect, PostgresAdapter, Driver, QueryCompiler, Kysely, DatabaseIntrospector, DatabaseConnection, CompiledQuery, QueryResult } from 'kysely';
type KyselyPluginResult<Schemas extends Record<string, XataRecord>> = Kysely<TransformSchema<Schemas>>;
type XataDialectConfig = {
xata: {
sql: SQLPluginResult;
};
};
declare class XataDialect implements Dialect {
private config;
constructor(config: XataDialectConfig);
createAdapter(): PostgresAdapter;
createDriver(): Driver;
createQueryCompiler(): QueryCompiler;
createIntrospector(db: Kysely<any>): DatabaseIntrospector;
}
declare class XataDriver implements Driver {
private config;
constructor(config: XataDialectConfig);
init(): Promise<void>;
acquireConnection(): Promise<DatabaseConnection>;
beginTransaction(): Promise<void>;
commitTransaction(): Promise<void>;
rollbackTransaction(): Promise<void>;
releaseConnection(_conn: XataConnection): Promise<void>;
destroy(): Promise<void>;
}
declare class XataConnection implements DatabaseConnection {
#private;
constructor(config: XataDialectConfig);
executeQuery<O>(compiledQuery: CompiledQuery): Promise<QueryResult<O>>;
streamQuery<O>(_compiledQuery: CompiledQuery, _chunkSize: number): AsyncIterableIterator<QueryResult<O>>;
}
type KyselyPluginResult<Schemas extends Record<string, XataRecord>> = Kysely<Model<Schemas>>;
declare class KyselyPlugin<Schemas extends Record<string, XataRecord>> extends XataPlugin {
build(pluginOptions: XataPluginOptions): KyselyPluginResult<Schemas>;
}
type TransformSchema<Schemas extends Record<string, XataRecord>> = {
type Model<Schemas extends Record<string, XataRecord>> = {
[Model in keyof Schemas]: EditableData<Schemas[Model]>;
};
export { KyselyPlugin, type KyselyPluginResult };
export { KyselyPlugin, type KyselyPluginResult, type Model, XataConnection, XataDialect, type XataDialectConfig, XataDriver };
{
"name": "@xata.io/kysely",
"version": "0.0.0-alpha.vefeaf45",
"version": "0.0.0-alpha.vf4e39e6",
"description": "",

@@ -21,3 +21,3 @@ "main": "./dist/index.cjs",

"dependencies": {
"@xata.io/client": "0.0.0-alpha.vefeaf45"
"@xata.io/client": "0.0.0-alpha.vf4e39e6"
},

@@ -24,0 +24,0 @@ "devDependencies": {

@@ -26,9 +26,14 @@ # @xata.io/kysely

import { Kysely } from 'kysely';
import { XataDialect } from '@xata.io/kysely';
import { XataDialect, Model } from '@xata.io/kysely';
import { DatabaseSchema, getXataClient } from './xata.ts';
const db = new Kysely<Database>({
xata // Your Xata client instance
const xata = getXataClient();
const db = new Kysely<Model<DatabaseSchema>>({
dialect: new XataDialect({ xata })
});
const drivers = await db.selectFrom('users').select(['name', 'email']).execute();
```
`XataDialect` accepts your Xata client instance as its only option. You can find more information about creating a Xata client instance in our [getting started guide](https://xata.io/docs/getting-started/installation).

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc