Skip to content

Commit

Permalink
test db stuff json
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav authored and nyalldawson committed Sep 14, 2018
1 parent f92a2ad commit e972e21
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/testdata/provider/testdata_pg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ SCRIPTS="
tests/testdata/provider/testdata_pg_array.sql
tests/testdata/provider/testdata_pg_raster.sql
tests/testdata/provider/testdata_pg_domain.sql
tests/testdata/provider/testdata_pg_json.sql
"

dropdb qgis_test 2> /dev/null || true
Expand Down
15 changes: 15 additions & 0 deletions tests/testdata/provider/testdata_pg_json.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

DROP TABLE IF EXISTS qgis_test.json;

CREATE TABLE qgis_test.json
(
pk SERIAL NOT NULL PRIMARY KEY,
jvalue json,
jbvalue jsonb
);

INSERT INTO qgis_test.json(jvalue, jbvalue)
VALUES
('[1,2,3]', '[4,5,6]'),
('{"a":1,"b":2}', '{"c":4,"d":5}'),
('123', '456');

0 comments on commit e972e21

Please sign in to comment.