endersoncosta / herbs2knex

Other
0 stars 2 forks source link

use `withSchema` instead of string concat #6

Open dalssoft opened 3 years ago

dalssoft commented 3 years ago

String concat for schema: https://github.com/endersoncosta/gotu2knex/blob/cef3e8636da2913fe9172b0bfc8522a7ea7bf0e1/src/repository.js#L13

Doc for withSchema http://knexjs.org/#Builder-withSchema

This should make queries more database agnostic.

BritoDoug commented 3 years ago

We have make the necessary changes, and looks like that:

    this.runner = di.knex(options.dbConfig).withSchema(this.schema).from(this.table)    

13