Skip to content

Commit

Permalink
add experimental index-nodeless entry point
Browse files Browse the repository at this point in the history
  • Loading branch information
koskimas committed Jan 6, 2022
1 parent 513bcb0 commit b8f59ed
Show file tree
Hide file tree
Showing 4 changed files with 211 additions and 211 deletions.
26 changes: 11 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,13 @@ much anything you can think of. Typescript is always there for you offering comp
you build a valid query.

Of course there are cases where things cannot be typed at compile time, and Kysely offers escape
hatches for these situations. With typescript you can always cast something to `any` if the types
fail you. With Kysely you can also explicitly tell it to ignore the typings, but the default is always
type-safety! See the [DynamicModule](https://koskimas.github.io/kysely/classes/DynamicModule.html#ref)
hatches for these situations. See the [DynamicModule](https://koskimas.github.io/kysely/classes/DynamicModule.html#ref)
for more info.

Kysely is still young and some useful features are propably not yet implemented. If you start
using Kysely and can't find something you'd want to use, please open an issue or join our
If you start using Kysely and can't find something you'd want to use, please open an issue or join our
[discord server](https://discord.gg/C9aJ49mCra).

[Here's](https://www.jakso.me/blog/kysely-a-type-safe-sql-query-builder-for-typescript)
an introductory blog post.
You can find a more thorough introduction [here](https://www.jakso.me/blog/kysely-a-type-safe-sql-query-builder-for-typescript).

# Table of contents

Expand All @@ -42,7 +38,7 @@ an introductory blog post.

# Installation

Kysely currently works on PostgreSQL, MySQL and SQLite. You can install it using
Kysely currently works on PostgreSQL, MySQL and SQLite. You can install it using:

```
# PostgreSQL
Expand Down Expand Up @@ -81,7 +77,7 @@ import {
interface PersonTable {
// Columns that are generated by the database should be marked
// using the `Generated` type. This way they are automatically
// made optional in inserts.
// made optional in inserts and updates.
id: Generated<number>

first_name: string
Expand All @@ -92,11 +88,11 @@ interface PersonTable {
// automatically by Kysely.
last_name: string | null

// You can specity a type for each operation (select, insert and update)
// using the `ColumnType<SelectType, InsertType, UpdateType>` wrapper.
// Here we define a column `modified_at` that is selected as a `Date`,
// can optionally be provided as a `string` in inserts and can never
// be updated:
// You can specity a different type for each operation (select, insert and
// update) using the `ColumnType<SelectType, InsertType, UpdateType>`
// wrapper. Here we define a column `modified_at` that is selected as
// a `Date`, can optionally be provided as a `string` in inserts and
// can never be updated:
modified_at: ColumnType<Date, string | undefined, never>
}

Expand Down Expand Up @@ -210,7 +206,7 @@ should never depend on the current code of your app because they need to work ev
changes completely. Migrations need to be "frozen in time".

The migrations can use the [Kysely.schema](https://koskimas.github.io/kysely/classes/SchemaModule.html)
module to modify the schema. Migrations can also run normal queries to modify the data.
module to modify the schema. Migrations can also run normal queries to modify data.

### PostgreSQL migration example

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kysely",
"version": "0.15.1",
"version": "0.15.2",
"description": "Type safe SQL query builder",
"repository": {
"type": "git",
Expand Down
193 changes: 193 additions & 0 deletions src/index-nodeless.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
export * from './kysely.js'
export * from './query-creator.js'

export * from './query-builder/where-interface.js'
export * from './query-builder/join-interface.js'
export * from './query-builder/returning-interface.js'
export * from './query-builder/having-interface.js'
export * from './query-builder/select-query-builder.js'
export * from './query-builder/insert-query-builder.js'
export * from './query-builder/update-query-builder.js'
export * from './query-builder/delete-query-builder.js'
export * from './query-builder/no-result-error.js'
export * from './query-builder/join-builder.js'
export * from './query-builder/expression-builder.js'
export * from './query-builder/function-builder.js'
export * from './query-builder/insert-result.js'
export * from './query-builder/delete-result.js'
export * from './query-builder/update-result.js'
export * from './query-builder/on-conflict-builder.js'

export * from './raw-builder/raw-builder.js'

export * from './query-executor/query-executor.js'
export * from './query-executor/default-query-executor.js'
export * from './query-executor/noop-query-executor.js'

export * from './query-compiler/default-query-compiler.js'
export * from './query-compiler/compiled-query.js'

export * from './schema/schema.js'
export * from './schema/create-table-builder.js'
export * from './schema/drop-table-builder.js'
export * from './schema/create-index-builder.js'
export * from './schema/drop-index-builder.js'
export * from './schema/create-schema-builder.js'
export * from './schema/drop-schema-builder.js'
export * from './schema/column-definition-builder.js'
export * from './schema/foreign-key-constraint-builder.js'
export * from './schema/alter-table-builder.js'
export * from './schema/create-view-builder.js'
export * from './schema/drop-view-builder.js'

export * from './dynamic/dynamic.js'

export * from './driver/driver.js'
export * from './driver/database-connection.js'
export * from './driver/connection-provider.js'
export * from './driver/default-connection-provider.js'
export * from './driver/single-connection-provider.js'

export * from './dialect/dialect.js'
export * from './dialect/dialect-adapter.js'
export * from './dialect/dialect-adapter-base.js'
export * from './dialect/database-introspector.js'

export * from './dialect/postgres/postgres-query-compiler.js'
export * from './dialect/postgres/postgres-introspector.js'
export * from './dialect/postgres/postgres-adapter.js'

export * from './dialect/mysql/mysql-query-compiler.js'
export * from './dialect/mysql/mysql-introspector.js'
export * from './dialect/mysql/mysql-adapter.js'

export * from './dialect/sqlite/sqlite-query-compiler.js'
export * from './dialect/sqlite/sqlite-introspector.js'
export * from './dialect/sqlite/sqlite-adapter.js'

export * from './query-compiler/default-query-compiler.js'
export * from './query-compiler/query-compiler.js'

export * from './migration/migrator.js'

export * from './plugin/kysely-plugin.js'
export * from './plugin/camel-case/camel-case-plugin.js'

export * from './operation-node/add-column-node.js'
export * from './operation-node/add-constraint-node.js'
export * from './operation-node/alias-node.js'
export * from './operation-node/alter-column-node.js'
export * from './operation-node/alter-table-node.js'
export * from './operation-node/and-node.js'
export * from './operation-node/check-constraint-node.js'
export * from './operation-node/column-definition-node.js'
export * from './operation-node/column-node.js'
export * from './operation-node/column-update-node.js'
export * from './operation-node/common-table-expression-node.js'
export * from './operation-node/common-table-expression-name-node.js'
export * from './operation-node/constraint-node.js'
export * from './operation-node/create-index-node.js'
export * from './operation-node/create-schema-node.js'
export * from './operation-node/create-table-node.js'
export * from './operation-node/create-view-node.js'
export * from './operation-node/data-type-node.js'
export * from './operation-node/default-value-node.js'
export * from './operation-node/delete-query-node.js'
export * from './operation-node/drop-column-node.js'
export * from './operation-node/drop-constraint-node.js'
export * from './operation-node/drop-index-node.js'
export * from './operation-node/drop-schema-node.js'
export * from './operation-node/drop-table-node.js'
export * from './operation-node/drop-view-node.js'
export * from './operation-node/filter-node.js'
export * from './operation-node/foreign-key-constraint-node.js'
export * from './operation-node/from-node.js'
export * from './operation-node/generated-node.js'
export * from './operation-node/group-by-item-node.js'
export * from './operation-node/group-by-node.js'
export * from './operation-node/having-node.js'
export * from './operation-node/identifier-node.js'
export * from './operation-node/insert-query-node.js'
export * from './operation-node/join-node.js'
export * from './operation-node/limit-node.js'
export * from './operation-node/list-node.js'
export * from './operation-node/modify-column-node.js'
export * from './operation-node/offset-node.js'
export * from './operation-node/on-conflict-node.js'
export * from './operation-node/on-duplicate-key-node.js'
export * from './operation-node/on-node.js'
export * from './operation-node/operation-node-source.js'
export * from './operation-node/operation-node-transformer.js'
export * from './operation-node/operation-node-utils.js'
export * from './operation-node/operation-node-visitor.js'
export * from './operation-node/operation-node.js'
export * from './operation-node/operator-node.js'
export * from './operation-node/or-node.js'
export * from './operation-node/order-by-item-node.js'
export * from './operation-node/order-by-node.js'
export * from './operation-node/parens-node.js'
export * from './operation-node/primary-constraint-node.js'
export * from './operation-node/primitive-value-list-node.js'
export * from './operation-node/query-node.js'
export * from './operation-node/raw-node.js'
export * from './operation-node/reference-node.js'
export * from './operation-node/references-node.js'
export * from './operation-node/rename-column-node.js'
export * from './operation-node/returning-node.js'
export * from './operation-node/select-all-node.js'
export * from './operation-node/select-query-node.js'
export * from './operation-node/select-query-node.js'
export * from './operation-node/selection-node.js'
export * from './operation-node/table-node.js'
export * from './operation-node/union-node.js'
export * from './operation-node/unique-constraint-node.js'
export * from './operation-node/update-query-node.js'
export * from './operation-node/value-list-node.js'
export * from './operation-node/value-node.js'
export * from './operation-node/values-node.js'
export * from './operation-node/where-node.js'
export * from './operation-node/with-node.js'

export * from './util/column-type.js'
export * from './util/compilable.js'
export * from './util/log.js'
export {
AnyColumn,
UnknownRow,
AnySelectQueryBuilder,
} from './util/type-utils.js'

export {
SelectExpression,
SelectExpressionOrList,
Selection,
} from './parser/select-parser.js'
export {
ReferenceExpression,
ReferenceExpressionOrList,
} from './parser/reference-parser.js'
export {
ValueExpression,
ValueExpressionOrList,
} from './parser/value-parser.js'
export {
FilterValueExpression,
FilterValueExpressionOrList,
ExistsExpression,
FilterOperator,
} from './parser/filter-parser.js'
export {
TableExpression,
TableExpressionOrList,
} from './parser/table-parser.js'
export {
JoinReferenceExpression,
JoinCallbackExpression,
} from './parser/join-parser.js'
export { InsertObject } from './parser/insert-values-parser.js'
export { MutationObject } from './parser/update-set-parser.js'
export {
OrderByExpression,
OrderByDirectionExpression,
} from './parser/order-by-parser.js'
export { UnionExpression } from './parser/union-parser.js'
Loading

0 comments on commit b8f59ed

Please sign in to comment.