test: add bulk insert to loadtest (#2358)

This commit is contained in:
Steve Chavez
2022-07-06 13:50:58 -05:00
committed by GitHub
parent 0708f46df3
commit 3cdc6d15d7
4 changed files with 1016 additions and 3 deletions
+1001
View File
File diff suppressed because it is too large Load Diff
+9 -3
View File
@@ -13,9 +13,15 @@ INSERT INTO test.actors VALUES (1, 'John Doe');
-- POST target needs generated PK
CREATE TABLE test.films (
PRIMARY KEY (film),
film INT GENERATED BY DEFAULT AS IDENTITY,
title TEXT
id INT PRIMARY KEY,
title TEXT,
year TEXT,
runtime TEXT,
genres TEXT[],
director TEXT,
actors TEXT,
plot TEXT,
"posterUrl" TEXT
);
-- DELETE target remains empty
+1
View File
@@ -1,3 +1,4 @@
{
"id": 0,
"title": "Workers Leaving The Lumière Factory In Lyon"
}
+5
View File
@@ -11,6 +11,11 @@ POST http://postgrest/films?columns=title
Prefer: tx=rollback
@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
Prefer: tx=rollback
@put.json