-
Notifications
You must be signed in to change notification settings - Fork 48
feat: MSSQL connector #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
ccb2dc7
351643d
ccb0822
f0555c9
bb523ac
081db35
30de038
4efde4e
e7ac3e9
4fe1fb6
e83f6d7
18425a6
9f38ae2
ba0d00b
513c8e4
7998351
5295f64
561fd7b
a527256
9007758
a5fa0e0
f34f985
aed2083
e02e32a
14e143e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| --- | ||
| icon: devicon-plain:microsoftsqlserver | ||
| --- | ||
|
|
||
| # MSSQL | ||
|
|
||
| > Connect DB0 to MSSQL Database using `tedious` | ||
|
|
||
| ## Usage | ||
|
|
||
| For this connector, you need to install [`tedious`](https://www.npmjs.com/package/tedious) dependency: | ||
|
|
||
| :pm-install{name="tedious"} | ||
|
|
||
| Use `mssql` connector: | ||
|
|
||
| ```js | ||
| import { createDatabase } from "db0"; | ||
| import mssql from "db0/connectors/mssql"; | ||
|
|
||
| const db = createDatabase( | ||
| mssql({ | ||
| /* options */ | ||
| }), | ||
| ); | ||
| ``` | ||
|
|
||
| ## Options | ||
|
|
||
| :read-more{to="https://tediousjs.github.io/tedious/api-connection.html#function_newConnection"} |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -67,6 +67,10 @@ | |||||||||||||||||||||||
| "pg": "^8.22.0", | ||||||||||||||||||||||||
| "prettier": "^3.9.5", | ||||||||||||||||||||||||
| "scule": "^1.3.0", | ||||||||||||||||||||||||
| "tedious": "^19.1.3", | ||||||||||||||||||||||||
| "typescript": "^5.9.3", | ||||||||||||||||||||||||
| "vitest": "^4.1.0", | ||||||||||||||||||||||||
| "wrangler": "^4.74.0" | ||||||||||||||||||||||||
| "typescript": "^7.0.2", | ||||||||||||||||||||||||
| "vitest": "^4.1.10", | ||||||||||||||||||||||||
| "wrangler": "^4.110.0" | ||||||||||||||||||||||||
|
Comment on lines
+70
to
76
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win Fix the duplicate dependency declarations and invalid JSON. Lines 71-73 duplicate the declarations on lines 74-76, and line 73 is missing the comma required before the next property. This makes Proposed fix "scule": "^1.3.0",
"tedious": "^19.1.3",
- "typescript": "^5.9.3",
- "vitest": "^4.1.0",
- "wrangler": "^4.74.0"
"typescript": "^7.0.2",
"vitest": "^4.1.10",
"wrangler": "^4.110.0"📝 Committable suggestion
Suggested change
🧰 Tools🪛 Biome (2.5.3)[error] 74-74: expected (parse) [error] 71-71: The key typescript was already declared. (lint/suspicious/noDuplicateObjectKeys) [error] 72-72: The key vitest was already declared. (lint/suspicious/noDuplicateObjectKeys) [error] 73-73: The key wrangler was already declared. (lint/suspicious/noDuplicateObjectKeys) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||||||||||||||||||||
|
|
@@ -78,7 +82,8 @@ | |||||||||||||||||||||||
| "drizzle-orm": "*", | ||||||||||||||||||||||||
| "kysely": "*", | ||||||||||||||||||||||||
| "mysql2": "*", | ||||||||||||||||||||||||
| "sqlite3": "*" | ||||||||||||||||||||||||
| "sqlite3": "*", | ||||||||||||||||||||||||
| "tedious": "*" | ||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||
| "peerDependenciesMeta": { | ||||||||||||||||||||||||
| "@libsql/client": { | ||||||||||||||||||||||||
|
|
@@ -96,6 +101,9 @@ | |||||||||||||||||||||||
| "mysql2": { | ||||||||||||||||||||||||
| "optional": true | ||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||
| "tedious": { | ||||||||||||||||||||||||
| "optional": true | ||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||
| "@electric-sql/pglite": { | ||||||||||||||||||||||||
| "optional": true | ||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.