You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>varreproduceSql=(require('knex')({client: 'pg'}).schema.createTable('users',function(table){table.increments()table.string('name')table.timestamps()}).toSQL())// no error, and `reproduceSql` is type `Sql`>varreproduceSqlNative=reproduceSql.toNative()// no error, and `reproduceSqlNative` is type `SqlNative`{sql: 'create table "users" ("id" serial primary key, "name" varchar(255), "created_at" timestamptz, "updated_at" timestamptz)',bindings: []}
Additional
Would be nice to cover all .toSQL().toNative() cases in tests.
If developers don't think .toSQL() return SqlNative[] is bug, would be nice to have document on how to build very clean sql code like below ❤️❤️❤️
Environment
Knex version: 2.4.2
Database + version: pg any
OS: any
@lorefnon
Bug
Brief
.toSQL()
returnSqlNative[]
And because
.toSQL()
returnSqlNative[]
,.toSQL().toNative()
got error.Actual
Expected
Additional
Would be nice to cover all
.toSQL().toNative()
cases in tests.If developers don't think
.toSQL()
returnSqlNative[]
is bug, would be nice to have document on how to build very clean sql code like below ❤️❤️❤️Related
#5369
The text was updated successfully, but these errors were encountered: