Skip to content

Commit a5a36c0

Browse files
authored
add MS SQL Server dialect. (kysely-org#595)
* 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.
1 parent 7c1e09d commit a5a36c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+6235
-1533
lines changed

docker-compose.yml

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
version: '3'
22
services:
3+
# credit to Knex.js team for the following mssql setup here:
4+
mssql:
5+
image: mcr.microsoft.com/mssql/server:2022-latest
6+
ports:
7+
- '21433:1433'
8+
environment:
9+
ACCEPT_EULA: Y
10+
MSSQL_PID: Express
11+
SA_PASSWORD: KyselyTest0
12+
healthcheck:
13+
test: /opt/mssql-tools/bin/sqlcmd -S mssql -U sa -P 'KyselyTest0' -Q 'select 1'
14+
waitmssql:
15+
image: mcr.microsoft.com/mssql/server:2017-latest
16+
links:
17+
- mssql
18+
depends_on:
19+
- mssql
20+
environment:
21+
MSSQL_PID: Express
22+
entrypoint:
23+
- bash
24+
- -c
25+
# https://docs.microsoft.com/en-us/sql/relational-databases/logs/control-transaction-durability?view=sql-server-ver15#bkmk_DbControl
26+
- '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'
327
mysql:
428
image: 'mysql/mysql-server'
529
environment:
@@ -17,4 +41,4 @@ services:
1741
POSTGRES_USER: kysely
1842
POSTGRES_HOST_AUTH_METHOD: trust
1943
ports:
20-
- '5434:5432'
44+
- '5434:5432'

0 commit comments

Comments
 (0)