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
feathers-knex doesn't support database schemas (MSSQL, PostgreSQL, SQLight3?)
So, this doesn't work:
module.exports=function(schemaName){returncontext=>{const{ table, createQuery }=context.service;constknex=createQuery(context.params);// do something with query hereknex.clearSelect().withSchema(schemaName).table(`${table} as ${table}`);context.params.knex=knex;returncontext;};};
Actually, it would be super helpful to be able to specify the schema when passing in the options to the service:
Fun fact: you can mimic schema behavior with SQLight3 with separate attached database files:
constknex=require('knex');constdb=knex({client: 'sqlite3',connection: {filename: './db.sqlite'}});// Create a public databaseconstschemaName='public';knex({client: 'sqlite3',connection: {filename: `./${schemaName}.sqlite`}});// Attach the public database to mimic a "schema"db.schema.raw(`attach database '${schemaName}.sqlite' as ${schemaName}`);
I've already got most of it done, so be on the lookout for a pull request!
Expected behavior
Support databases schemas (withSchema knex method)
Actual behavior
Errors... lots and lots of errors.
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
latest NodeJS version:
v8.10.0 Operating System:
Windows, yeah... I know. Browser Version:
Chrome, of course... duh! React Native Version:
N/A Module Loader:
Say what now?
The text was updated successfully, but these errors were encountered:
jerfowler
added a commit
to jerfowler/feathers-knex
that referenced
this issue
Mar 27, 2018
Steps to reproduce
feathers-knex doesn't support database schemas (MSSQL, PostgreSQL, SQLight3?)
So, this doesn't work:
Actually, it would be super helpful to be able to specify the schema when passing in the options to the service:
Fun fact: you can mimic schema behavior with SQLight3 with separate attached database files:
I've already got most of it done, so be on the lookout for a pull request!
Expected behavior
Support databases schemas (
withSchema
knex method)Actual behavior
Errors... lots and lots of errors.
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
latest
NodeJS version:
v8.10.0
Operating System:
Windows, yeah... I know.
Browser Version:
Chrome, of course... duh!
React Native Version:
N/A
Module Loader:
Say what now?
The text was updated successfully, but these errors were encountered: