test: add bulk insert to loadtest (#2358)
This commit is contained in:
+1001
File diff suppressed because it is too large
Load Diff
@@ -13,9 +13,15 @@ INSERT INTO test.actors VALUES (1, 'John Doe');
|
|||||||
|
|
||||||
-- POST target needs generated PK
|
-- POST target needs generated PK
|
||||||
CREATE TABLE test.films (
|
CREATE TABLE test.films (
|
||||||
PRIMARY KEY (film),
|
id INT PRIMARY KEY,
|
||||||
film INT GENERATED BY DEFAULT AS IDENTITY,
|
title TEXT,
|
||||||
title TEXT
|
year TEXT,
|
||||||
|
runtime TEXT,
|
||||||
|
genres TEXT[],
|
||||||
|
director TEXT,
|
||||||
|
actors TEXT,
|
||||||
|
plot TEXT,
|
||||||
|
"posterUrl" TEXT
|
||||||
);
|
);
|
||||||
|
|
||||||
-- DELETE target remains empty
|
-- DELETE target remains empty
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
|
"id": 0,
|
||||||
"title": "Workers Leaving The Lumière Factory In Lyon"
|
"title": "Workers Leaving The Lumière Factory In Lyon"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,11 @@ POST http://postgrest/films?columns=title
|
|||||||
Prefer: tx=rollback
|
Prefer: tx=rollback
|
||||||
@post.json
|
@post.json
|
||||||
|
|
||||||
|
POST http://postgrest/films?columns=id,title,year,runtime,genres,director,actors,plot,posterUrl
|
||||||
|
Prefer: tx=rollback
|
||||||
|
# this bulk.json was obtained from https://github.com/erik-sytnyk/movies-list/blob/master/db.json
|
||||||
|
@bulk.json
|
||||||
|
|
||||||
PUT http://postgrest/actors?actor=eq.1&columns=name
|
PUT http://postgrest/actors?actor=eq.1&columns=name
|
||||||
Prefer: tx=rollback
|
Prefer: tx=rollback
|
||||||
@put.json
|
@put.json
|
||||||
|
|||||||
Reference in New Issue
Block a user