Bulk update (#2311)
* refactor: remove EmbedPath type from qsFiltersRoot * Rename reset items function for reusability
This commit is contained in:
Vendored
+6
@@ -778,3 +778,9 @@ INSERT INTO private.internal_job (id, parent_id) VALUES (2, 1);
|
||||
|
||||
TRUNCATE TABLE test.test CASCADE;
|
||||
INSERT INTO test.test (id, parent_id) VALUES (1, null), (2, 1);
|
||||
|
||||
TRUNCATE TABLE test.bulk_update_items CASCADE;
|
||||
INSERT INTO test.bulk_update_items (id, name, observation) VALUES (1, 'item-1', NULL), (2, 'item-2', NULL), (3, 'item-3', NULL);
|
||||
|
||||
TRUNCATE TABLE test.bulk_update_items_cpk CASCADE;
|
||||
INSERT INTO test.bulk_update_items_cpk (id, name, observation) VALUES (1, 'item-1', NULL), (2, 'item-2', NULL), (3, 'item-3', NULL);
|
||||
|
||||
Vendored
+2
@@ -186,6 +186,8 @@ GRANT ALL ON TABLE
|
||||
, series_popularity
|
||||
, test
|
||||
, view_test
|
||||
, bulk_update_items
|
||||
, bulk_update_items_cpk
|
||||
TO postgrest_test_anonymous;
|
||||
|
||||
GRANT INSERT ON TABLE insertonly TO postgrest_test_anonymous;
|
||||
|
||||
Vendored
+16
-1
@@ -2528,7 +2528,7 @@ select *, 'static'::text as static from limited_delete_items;
|
||||
create view limited_delete_items_cpk_view as
|
||||
select * from limited_delete_items_cpk;
|
||||
|
||||
create function reset_limited_items(tbl_name text default '') returns void as $_$ begin
|
||||
create function reset_items_tables(tbl_name text default '') returns void as $_$ begin
|
||||
execute format(
|
||||
$$
|
||||
delete from %I;
|
||||
@@ -2634,3 +2634,18 @@ CREATE TABLE test.test (
|
||||
|
||||
CREATE OR REPLACE VIEW test.view_test AS
|
||||
SELECT id FROM test.test;
|
||||
|
||||
-- Tables to test bulk updates
|
||||
|
||||
CREATE TABLE test.bulk_update_items (
|
||||
id INT PRIMARY KEY,
|
||||
name TEXT,
|
||||
observation TEXT
|
||||
);
|
||||
|
||||
CREATE TABLE test.bulk_update_items_cpk (
|
||||
id INT,
|
||||
name TEXT,
|
||||
observation TEXT,
|
||||
PRIMARY KEY (id, name)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user