@squill/mysql-5.7
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "@squill/mysql-5.7", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "A MySQL 5.7 query-builder/ORM", | ||
@@ -58,5 +58,5 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@squill/squill": "0.0.4", | ||
"@squill/squill": "0.0.5", | ||
"mysql": "^2.17.1" | ||
} | ||
} |
@@ -12,9 +12,9 @@ At the moment, written with MySQL 5.7.26 in mind. | ||
```ts | ||
import * as squill from "@squill/squill"; | ||
import * as sql from "@squill/squill"; | ||
import * as mysql from "@squill/mysql-5.7"; | ||
const myTable = squill.table("myTable") | ||
const myTable = sql.table("myTable") | ||
.addColumns({ | ||
myTableId : squill.dtBigIntSigned(), | ||
description : squill.dtVarChar(1024), | ||
myTableId : sql.dtBigIntSigned(), | ||
description : sql.dtVarChar(1024), | ||
}) | ||
@@ -31,3 +31,3 @@ .setAutoIncrement(columns => columns.myTableId); | ||
pool | ||
await pool | ||
.acquire(connection => myTable | ||
@@ -45,3 +45,3 @@ .whereEqPrimaryKey({ | ||
(err) => { | ||
if (squill.isSqlError(err)) { | ||
if (sql.isSqlError(err)) { | ||
//Probably some error related to executing a SQL query | ||
@@ -58,6 +58,6 @@ //Maybe a RowNotFoundError | ||
*/ | ||
const myQuery = squill.from(myTable) | ||
const myQuery = sql.from(myTable) | ||
.select(columns => [ | ||
columns.myTableId | ||
squill.concat( | ||
sql.concat( | ||
"Description: ", | ||
@@ -68,3 +68,3 @@ columns.description | ||
pool | ||
await pool | ||
.acquire(connection => myQuery | ||
@@ -85,3 +85,3 @@ .whereEqPrimaryKey( | ||
(err) => { | ||
if (squill.isSqlError(err)) { | ||
if (sql.isSqlError(err)) { | ||
//Probably some error related to executing a SQL query | ||
@@ -88,0 +88,0 @@ //Maybe a RowNotFoundError |
400065
+ Added@squill/squill@0.0.5(transitive)
- Removed@squill/squill@0.0.4(transitive)
Updated@squill/squill@0.0.5