-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is parse on fetch limited to sqlite? #46
Comments
Hi @pandapaul. This plugin was designed to fix the JSON columns issue with PostgreSQL, and only later introduced tests for SQLite. If I remember correctly we believed that there was no need to use this plugin with MySQL as the client handles all these issues itself. However, can you provide a snippet of your code and schema to figure out if we should introduce MySQL on the test suite? |
Oh interesting. The knex migration I use for creating this table looks approximately like this: exports.up = knex => knex.schema.createTable('aTable', (table) => {
table.uuid('id').primary().notNullable()
table.json('someJson')
}) And here's what the bookshelf model looks like: module.exports = bookshelf.Model.extend({
tableName: 'aTable',
uuid: true,
}, {
jsonColumns: ['someJson'],
}) With mysql as the client, |
Perhaps the real problem is that I'll attempt to adjust my schema and let you know how it goes. |
I think it's the same problem here knex/knex#1800. |
Agreed. Changing the schema to use |
@pandapaul Released as 2.1.0. |
Splendid. Thanks @ricardogama and @abelsoares |
https://github.com/seegno/bookshelf-json-columns/blob/master/src/index.js#L52 limits parsing on fetch to only sqlite and sqlite3. Why is this? Allowing parse on fetch with mysql as the client seems to work great for me, but I might be misunderstanding how to enable parse on fetch in some other way.
Is there another way I should be enabling parse on fetch with mysql as the client?
Thanks very much,
Paul
The text was updated successfully, but these errors were encountered: