Skip to content

Instantly share code, notes, and snippets.

@ryogrid
Last active October 28, 2023 01:13
Show Gist options
  • Save ryogrid/6beee126af2aaebd160a0497c2c9611f to your computer and use it in GitHub Desktop.
Save ryogrid/6beee126af2aaebd160a0497c2c9611f to your computer and use it in GitHub Desktop.
SamehadaDB REST I/F sample request jsons
{"Query":"CREATE TABLE name_age_list(name VARCHAR(256), age INT);"}
{"Query":"INSERT INTO name_age_list(name, age) VALUES ('Sam', 20);"}
{"Query":"INSERT INTO name_age_list(name, age) VALUES ('Bob', 22);"}
{"Query":"INSERT INTO name_age_list(name, age) VALUES ('Alice', 25);"}
{"Query":"INSERT INTO name_age_list(name, age) VALUES ('Kathy', 18);"}
{"Query":"INSERT INTO name_age_list(name, age) VALUES ('Andy', 18);"}
{"Query":"DELETE FROM name_age_list WHERE age > 20;"}
{"Query":"SELECT * FROM name_age_list;"}
// below is result of last SELECT query. results of other queries are omitted here
{
"Result": [
{
"C": [
"Sam",
20
]
},
{
"C": [
"Kathy",
18
]
},
{
"C": [
"Andy",
18
]
}
],
"Error": "SUCCESS"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment