I woule like to use LinqConnect model.
I have a simple table with two columns:
Code: Select all
CREATE TABLE books ( id integer primary key, data json );
Code: Select all
INSERT INTO books VALUES (1,
'{ "name": "Book the First", "author": { "first_name": "Bob", "last_name": "White" } }');
INSERT INTO books VALUES (2,
'{ "name": "Book the Second", "author": { "first_name": "Charles", "last_name": "Xavier" } }');
INSERT INTO books VALUES (3,
'{ "name": "Book the Third", "author": { "first_name": "Jim", "last_name": "Brown" } }');
Code: Select all
SELECT id, data->'name' as book, data->'publisher' as publisher FROM books;