Skip to content

Commit 7c953c8

Browse files
author
Benjamin Maurer
committed
Rename update path according to wiki
1 parent fa129f0 commit 7c953c8

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

frameworks/Haskell/postgrest/README.md

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ http://localhost:8080/cached_query?queries=
3737

3838
### UPDATE Not Implemented
3939

40-
http://localhost:3000/rpc/update?queries=
40+
http://localhost:3000/rpc/updates?queries=
4141

4242
### FORTUNES
4343

frameworks/Haskell/postgrest/src/update.sql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
create or replace function update(queries text default '') returns jsonb as $$
1+
create or replace function updates(queries text default '') returns jsonb as $$
22
DECLARE
33
r "World"%ROWTYPE;
44
j jsonb := jsonb_build_array();
55
new_rnd int;
66
rnd_id int;
77
count int;
88
BEGIN
9-
SET TRANSACTION READ WRITE;
109
IF queries ~ '^[1-9]\d{0,2}$' THEN
1110
count := CAST(queries as int);
12-
ELSE
13-
count := 1;
11+
ELSE
12+
count := 1;
1413
END IF;
1514
IF count > 500 THEN
1615
count := 500;

0 commit comments

Comments
 (0)