Skip to content

Commit

Permalink
add MS SQL Server dialect. (#595)
Browse files Browse the repository at this point in the history
* add mssql dev dependency.

* add mssql to docker-compose.yml.

* config? @ pg driver.

* initial dialect implementation.

* fix browser tests by getting tedious stuff in config.

* introduce mssql to test-setup.

* get dialect to a working state.

* introduce mssql to insert test suite.

* introduce mssql to select test suite.

* add mssql to test scripts.

* make tests pass type-checks.

* fix new tests after update branch.

* introduce mssql to update test suite.

* fix mysql test expectation.

* introduce mssql to delete test suite.

* introduce mssql to with test suite.

* introduce mssql to with schema test suite.

* introduce mssql to where test suite.

* test mssql vs. selectNoFrom.

* introduce mssql to set operation test suite.

* fix error rejections.

* introduce mssql to schema module test suite.

* remove mssql, add tedious and tarn.

* initial pool implementation using tarn.

* fix failing where tests.

* fix compilation errors at select tests.

* introduce mssql to schema module test suite, pt. 2.

* compile mssql alter table alter column properly.

* introduce mssql to schema module test suite, pt. 3.

* fix failing where test.

* introduce mssql to sanitize identifiers test suite.

* introduce mssql to raw sql test suite.

* introduce mssql to raw query test suite.

* introduce mssql to order by test suite.

* introduce mssql to join test suite.

* introduce mssql to having test suite.

* introduce mssql into group by test suite.

* empty and/or works everywhere.

* introduce mssql to expression test suite.

* introduce mssql to execute test suite.

* introduce mssql to deduplicate joins test suite.

* introduce mssql to coalesce test suite.

* introduce mssql to clear test suite.

* introduce mssql case test suite.

* introduce mssql to camel case test suite.

* introduce mssql to aggregate function test suite.

* lift only.

* connection validate shouldn't trigger kysely stuff.

* introduce mssql to transaction test suite, pt. 1.

* fix introspect tests.

* remove mssql types.

* add @types/tedious dev dep.

* introduce mssql to transaction test suite, pt. 2.

* introduce mssql to introspect test suite, pt. 1.

* introduce mssql to introspect test suite, pt. 2.

* fix default to column introspection @ mssql.

* autoincrementing columns are technically columns with default values.

* dont use ifNotExists in mssql migrations.

* introduce mssql to migration test suite.

* implement streaming.

* fix schema tests.

* rename DIALECTS_WITH_MSSQL back to DIALECTS.

* misc adjustments and js docs.

* fix wording of `supportsCreateIfNotExists`.

* add mssql to key value set variant test case.
  • Loading branch information
igalklebanov authored Sep 9, 2023
1 parent 7c1e09d commit a5a36c0
Show file tree
Hide file tree
Showing 53 changed files with 6,235 additions and 1,533 deletions.
26 changes: 25 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
version: '3'
services:
# credit to Knex.js team for the following mssql setup here:
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
ports:
- '21433:1433'
environment:
ACCEPT_EULA: Y
MSSQL_PID: Express
SA_PASSWORD: KyselyTest0
healthcheck:
test: /opt/mssql-tools/bin/sqlcmd -S mssql -U sa -P 'KyselyTest0' -Q 'select 1'
waitmssql:
image: mcr.microsoft.com/mssql/server:2017-latest
links:
- mssql
depends_on:
- mssql
environment:
MSSQL_PID: Express
entrypoint:
- bash
- -c
# https://docs.microsoft.com/en-us/sql/relational-databases/logs/control-transaction-durability?view=sql-server-ver15#bkmk_DbControl
- 'until /opt/mssql-tools/bin/sqlcmd -S mssql -U sa -P KyselyTest0 -d master -Q "CREATE DATABASE kysely_test; ALTER DATABASE kysely_test SET ALLOW_SNAPSHOT_ISOLATION ON; ALTER DATABASE kysely_test SET DELAYED_DURABILITY = FORCED"; do sleep 5; done'
mysql:
image: 'mysql/mysql-server'
environment:
Expand All @@ -17,4 +41,4 @@ services:
POSTGRES_USER: kysely
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- '5434:5432'
- '5434:5432'
Loading

1 comment on commit a5a36c0

@vercel
Copy link

@vercel vercel bot commented on a5a36c0 Sep 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

kysely – ./

kysely-git-master-kysely-team.vercel.app
kysely-kysely-team.vercel.app
kysely.dev
www.kysely.dev

Please sign in to comment.