christophertrudel / node_acl_knex

A Knex.js backend for node_acl
MIT License
46 stars 18 forks source link

SQLite support #20

Open danderson00 opened 7 years ago

danderson00 commented 7 years ago

This is a relatively straightforward change. Basically it explicitly calls JSON.stringify on the value column before inserting / updating and parses it on the way out. Additionally, the set of SQL statements used for setup / teardown are executed individually (SQLite does not support multiple statements in the same command).

I've run the tests against SQLite and all pass, but have not run them against MySQL or PostgreSQL. I see no reason why they should fail, at least on PostgreSQL.

Let me know what you think. This should resolve #18 and #19.

danderson00 commented 7 years ago

Hmm... The travis tests are useful for running PostgreSQL tests. I wondered if there would be an issue with empty JSON. I'll try to fix - my goal at the end of this is to support both SQLite and mssql.

danderson00 commented 7 years ago

Turns out there are some other difficult to solve issues with MSSQL. I'm not sure if I'll get around to fixing this properly.