Open elhigu opened 8 years ago
It would be a great benefit if we could use AlaSQL dialect instead of SQLite as it doesnt need to GNU build anything. Sadly this mentioned PR #1063 is one year behind. And as it was understood from the discussion there is too few documentation for AlaSQL to consider supporting it fully.
But maybe it could be solved the other way by allowing to use our own dialects by providing it in initialization config? src/inrex.js#L17-L22
/*17*/ if (arguments.length === 0 || (!config.client && !config.dialect)) {
/*18*/ Dialect = makeClient(Client)
/*++*/ } else if (typeof config.client === 'function' && config.client.prototype instanceOf Client) {
/*++*/ Dialect = makeClient(config.client)
/*19*/ } else {
/*20*/ var clientName = config.client || config.dialect
/*21*/ Dialect = makeClient(require('./dialects/' + (aliases[clientName] || clientName) + '/index.js'))
/*22*/ }
This way we could use any custom dialect apart from knex ones. @elhigu or is there a way to achieve this some other way?
@vellotis that sounds like a fine change. I'm surprised it's not already supported.
@vellotis I like the idea 👍
AqlSQL dialect published as a separate package knex-alasql. Currently doesn't meet the requirements for PR. But may be possible in the future.
If someone feels like pulling this through, there is initial implementation found in https://github.com/tgriesser/knex/pull/1063