hiddentao / squel

:office: SQL query string builder for Javascript
https://hiddentao.github.io/squel
MIT License
1.57k stars 231 forks source link

How to specify schema name for tables? #348

Open rubtk opened 6 years ago

rubtk commented 6 years ago

How can i specify schema name for tables? Are there some built in way, instead of coding like this

var s = squel.select();
s.from("schema.student");
log( s.toString() );    /* SELECT * FROM schema.student */
igrek8 commented 6 years ago

@rubtk, Neither did I manage to provide a schema. I had to use this workaround:

squel
  .select({ autoQuoteTableNames: true })
  .from(`schene\`.\`${my_table_name}`);
gavinbelson commented 5 years ago

Following.. A schema tag would make things cleaner