-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored client and improved connection
- Loading branch information
1 parent
62225bd
commit 4ce8069
Showing
10 changed files
with
1,005 additions
and
974 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
// import { MysqlClient } from "./client.ts"; | ||
// import { URL_TEST_CONNECTION } from "./utils/testing.ts"; | ||
// import { implementationTest } from "@halvardm/sqlx/testing"; | ||
import { MysqlClient } from "./client.ts"; | ||
import { URL_TEST_CONNECTION } from "./utils/testing.ts"; | ||
import { implementationTest } from "@halvardm/sqlx/testing"; | ||
|
||
// Deno.test("MysqlClient", async (t) => { | ||
// await implementationTest({ | ||
// t, | ||
// Client: MysqlClient, | ||
// connectionUrl: URL_TEST_CONNECTION, | ||
// connectionOptions: {}, | ||
// queries:{ | ||
// createTable: "CREATE TABLE IF NOT EXISTS sqlxtesttable (testcol TEXT)", | ||
// dropTable: "DROP TABLE IF EXISTS sqlxtesttable", | ||
// insertOneToTable: "INSERT INTO sqlxtesttable (testcol) VALUES (?)", | ||
// insertManyToTable: "INSERT INTO sqlxtesttable (testcol) VALUES (?),(?),(?)", | ||
// selectOneFromTable: "SELECT * FROM sqlxtesttable WHERE testcol = ? LIMIT 1", | ||
// selectByMatchFromTable: "SELECT * FROM sqlxtesttable WHERE testcol = ?", | ||
// selectManyFromTable: "SELECT * FROM sqlxtesttable", | ||
// select1AsString: "SELECT '1' as result", | ||
// select1Plus1AsNumber: "SELECT 1+1 as result", | ||
// deleteByMatchFromTable: "DELETE FROM sqlxtesttable WHERE testcol = ?", | ||
// deleteAllFromTable: "DELETE FROM sqlxtesttable", | ||
// } | ||
// }); | ||
// }); | ||
Deno.test("MysqlClient", async (t) => { | ||
await implementationTest({ | ||
t, | ||
Client: MysqlClient, | ||
connectionUrl: URL_TEST_CONNECTION, | ||
connectionOptions: {}, | ||
queries: { | ||
createTable: "CREATE TABLE IF NOT EXISTS sqlxtesttable (testcol TEXT)", | ||
dropTable: "DROP TABLE IF EXISTS sqlxtesttable", | ||
insertOneToTable: "INSERT INTO sqlxtesttable (testcol) VALUES (?)", | ||
insertManyToTable: | ||
"INSERT INTO sqlxtesttable (testcol) VALUES (?),(?),(?)", | ||
selectOneFromTable: | ||
"SELECT * FROM sqlxtesttable WHERE testcol = ? LIMIT 1", | ||
selectByMatchFromTable: "SELECT * FROM sqlxtesttable WHERE testcol = ?", | ||
selectManyFromTable: "SELECT * FROM sqlxtesttable", | ||
select1AsString: "SELECT '1' as result", | ||
select1Plus1AsNumber: "SELECT 1+1 as result", | ||
deleteByMatchFromTable: "DELETE FROM sqlxtesttable WHERE testcol = ?", | ||
deleteAllFromTable: "DELETE FROM sqlxtesttable", | ||
}, | ||
}); | ||
}); |
Oops, something went wrong.