sql:'create table "test_table" ("id" serial primary key not null, "first_name" varchar(255) not null, "last_name" varchar(255) not null, "email" varchar(255) null, "logins" integer not null default \'1\', "about" text not null, "created_at" timestamp not null, "updated_at" timestamp not null)'
bindings:['Lorem ipsum Dolore labore incididunt enim.',newDate(),'test@example.com','Test','User',1,newDate(),'Lorem ipsum Dolore labore incididunt enim.',newDate(),'test2@example.com','Test','User',2,newDate()],
type:'insert'
},
sqlite3:{
sql:'insert into "accounts" ("first_name", "last_name", "email", "logins", "about", "created_at", "updated_at") select ? as "first_name", ? as "last_name", ? as "email", ? as "logins", ? as "about", ? as "created_at", ? as "updated_at" union select ? as "first_name", ? as "last_name", ? as "email", ? as "logins", ? as "about", ? as "created_at", ? as "updated_at"',
bindings:['Lorem ipsum Dolore labore incididunt enim.',newDate(),'test@example.com','Test','User',1,newDate(),'Lorem ipsum Dolore labore incididunt enim.',newDate(),'test2@example.com','Test','User',2,newDate()],
bindings:['Lorem ipsum Dolore labore incididunt enim.',newDate(),'test2@example.com','Test','User',2,newDate(),'Lorem ipsum Dolore labore incididunt enim.',newDate(),'test2@example.com','Test','User',2,newDate()],
type:'insert'
},
sqlite3:{
sql:'insert into "accounts" ("first_name", "last_name", "email", "about", "logins", "created_at", "updated_at") select ? as "first_name", ? as "last_name", ? as "email", ? as "about", ? as "logins", ? as "created_at", ? as "updated_at" union select ? as "first_name", ? as "last_name", ? as "email", ? as "about", ? as "logins", ? as "created_at", ? as "updated_at"',
bindings:['Lorem ipsum Dolore labore incididunt enim.',newDate(),'test2@example.com','Test','User',2,newDate(),'Lorem ipsum Dolore labore incididunt enim.',newDate(),'test2@example.com','Test','User',2,newDate()],
sql:'select * from `accounts` where `x` in (?, ?, ?)',
bindings:[1,2,3]
}],
sqlite3:[{
sql:'select * from "accounts" where "x" in (?, ?, ?)',
bindings:[1,2,3]
}],
postgres:[{
sql:'select * from "accounts" where "x" in (?, ?, ?)',
bindings:[1,2,3]
}]
},
'selects.7':{
mysql:{
sql:'select * from `table` where `id` = ? or `id` in (?, ?, ?)',
bindings:[1,2,3,4]
},
sqlite3:{
sql:'select * from "table" where "id" = ? or "id" in (?, ?, ?)',
bindings:[1,2,3,4]
},
postgres:{
sql:'select * from "table" where "id" = ? or "id" in (?, ?, ?)',
bindings:[1,2,3,4]
}
},
'selects.8':{
mysql:{
sql:'select * from `accounts` where exists (select `column1` from `table2` where `id` = ? and `otherItem` = ?)',
bindings:[1,2]
},
sqlite3:{
sql:'select * from "accounts" where exists (select "column1" from "table2" where "id" = ? and "otherItem" = ?)',
bindings:[1,2]
},
postgres:{
sql:'select * from "accounts" where exists (select "column1" from "table2" where "id" = ? and "otherItem" = ?)',
bindings:[1,2]
}
},
'selects.9':{
mysql:{
sql:'select * from `table` where `id` between ? and ?',
bindings:[1,100]
},
sqlite3:{
sql:'select * from "table" where "id" between ? and ?',
bindings:[1,100]
},
postgres:{
sql:'select * from "table" where "id" between ? and ?',
bindings:[1,100]
}
},
'selects.10':{
mysql:{
sql:'select * from `table` where `id` between ? and ? or `id` between ? and ?',
bindings:[1,100,200,300]
},
sqlite3:{
sql:'select * from "table" where "id" between ? and ? or "id" between ? and ?',
bindings:[1,100,200,300]
},
postgres:{
sql:'select * from "table" where "id" between ? and ? or "id" between ? and ?',
bindings:[1,100,200,300]
}
},
'selects.11':{
mysql:{
sql:'select `tableName`.*, `otherTable`.`name` from `tableName` inner join `otherTable` on `tableName`.`id` = `otherTable`.`otherId`',
bindings:[]
},
sqlite3:{
sql:'select "tableName".*, "otherTable"."name" from "tableName" inner join "otherTable" on "tableName"."id" = "otherTable"."otherId"',
bindings:[]
},
postgres:{
sql:'select "tableName".*, "otherTable"."name" from "tableName" inner join "otherTable" on "tableName"."id" = "otherTable"."otherId"',
bindings:[]
}
},
'selects.12':{
mysql:{
sql:'select `tableName`.*, `otherTable`.`name` from `tableName` left join `otherTable` on `tableName`.`id` = `otherTable`.`otherId`',
bindings:[]
},
sqlite3:{
sql:'select "tableName".*, "otherTable"."name" from "tableName" left join "otherTable" on "tableName"."id" = "otherTable"."otherId"',
bindings:[]
},
postgres:{
sql:'select "tableName".*, "otherTable"."name" from "tableName" left join "otherTable" on "tableName"."id" = "otherTable"."otherId"',
bindings:[]
}
},
'selects.13':{
mysql:{
sql:'select * from `tableName` left join `table2` on `tableName`.`one_id` = `table2`.`tableName_id` or `tableName`.`other_id` = `table2`.`tableName_id2`',
bindings:[]
},
sqlite3:{
sql:'select * from "tableName" left join "table2" on "tableName"."one_id" = "table2"."tableName_id" or "tableName"."other_id" = "table2"."tableName_id2"',
bindings:[]
},
postgres:{
sql:'select * from "tableName" left join "table2" on "tableName"."one_id" = "table2"."tableName_id" or "tableName"."other_id" = "table2"."tableName_id2"',