feat: add limited delete
This commit is contained in:
committed by
Steve Chavez
parent
f4becf99ad
commit
331e88ea39
Vendored
+15
-6
@@ -737,11 +737,20 @@ INSERT INTO test.fav_numbers VALUES (ROW(0.5, 0.5), 'A'), (ROW(0.6, 0.6), 'B');
|
||||
TRUNCATE TABLE test.arrays CASCADE;
|
||||
INSERT INTO test.arrays VALUES (0, '{1,2,3}', '{{1,2,3},{4,5,6},{7,8,9}}'), (1, '{11,12,13}', '{{11,12,13},{14,15,16},{17,18,19}}');
|
||||
|
||||
TRUNCATE TABLE test.limited_updated_items CASCADE;
|
||||
INSERT INTO test.limited_updated_items VALUES (1, 'item-1'), (2, 'item-2'), (3, 'item-3');
|
||||
TRUNCATE TABLE test.limited_update_items CASCADE;
|
||||
INSERT INTO test.limited_update_items VALUES (1, 'item-1'), (2, 'item-2'), (3, 'item-3');
|
||||
|
||||
TRUNCATE TABLE test.limited_updated_items_cpk CASCADE;
|
||||
INSERT INTO test.limited_updated_items_cpk VALUES (1, 'item-1'), (2, 'item-2'), (3, 'item-3');
|
||||
TRUNCATE TABLE test.limited_update_items_cpk CASCADE;
|
||||
INSERT INTO test.limited_update_items_cpk VALUES (1, 'item-1'), (2, 'item-2'), (3, 'item-3');
|
||||
|
||||
TRUNCATE TABLE test.limited_updated_items_no_pk CASCADE;
|
||||
INSERT INTO test.limited_updated_items_no_pk VALUES (1, 'item-1'), (2, 'item-2'), (3, 'item-3');
|
||||
TRUNCATE TABLE test.limited_update_items_no_pk CASCADE;
|
||||
INSERT INTO test.limited_update_items_no_pk VALUES (1, 'item-1'), (2, 'item-2'), (3, 'item-3');
|
||||
|
||||
TRUNCATE TABLE test.limited_delete_items CASCADE;
|
||||
INSERT INTO test.limited_delete_items VALUES (1, 'item-1'), (2, 'item-2'), (3, 'item-3');
|
||||
|
||||
TRUNCATE TABLE test.limited_delete_items_cpk CASCADE;
|
||||
INSERT INTO test.limited_delete_items_cpk VALUES (1, 'item-1'), (2, 'item-2'), (3, 'item-3');
|
||||
|
||||
TRUNCATE TABLE test.limited_delete_items_no_pk CASCADE;
|
||||
INSERT INTO test.limited_delete_items_no_pk VALUES (1, 'item-1'), (2, 'item-2'), (3, 'item-3');
|
||||
|
||||
Vendored
+8
-4
@@ -163,10 +163,14 @@ GRANT ALL ON TABLE
|
||||
, clientinfo
|
||||
, contact
|
||||
, chores
|
||||
, limited_mut_items
|
||||
, limited_mut_items_cpk
|
||||
, limited_mut_items_no_pk
|
||||
, limited_mut_items_view
|
||||
, limited_update_items
|
||||
, limited_update_items_cpk
|
||||
, limited_update_items_no_pk
|
||||
, limited_update_items_view
|
||||
, limited_delete_items
|
||||
, limited_delete_items_cpk
|
||||
, limited_delete_items_no_pk
|
||||
, limited_delete_items_view
|
||||
TO postgrest_test_anonymous;
|
||||
|
||||
GRANT INSERT ON TABLE insertonly TO postgrest_test_anonymous;
|
||||
|
||||
Vendored
+19
@@ -2488,6 +2488,25 @@ create table limited_update_items_no_pk(
|
||||
create view limited_update_items_view as
|
||||
select * from limited_update_items;
|
||||
|
||||
create table limited_delete_items(
|
||||
id int primary key
|
||||
, name text
|
||||
);
|
||||
|
||||
create table limited_delete_items_cpk(
|
||||
id int
|
||||
, name text
|
||||
, primary key (id, name)
|
||||
);
|
||||
|
||||
create table limited_delete_items_no_pk(
|
||||
id int
|
||||
, name text
|
||||
);
|
||||
|
||||
create view limited_delete_items_view as
|
||||
select * from limited_delete_items;
|
||||
|
||||
create function reset_limited_items(tbl_name text default '') returns void as $_$ begin
|
||||
execute format(
|
||||
$$
|
||||
|
||||
Reference in New Issue
Block a user