This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Boolean expression for a column | |
"column": { | |
"_eq": "value", | |
"_gt": "value" | |
} | |
// AND expression | |
"and": { | |
"column1": {...}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- AST1 | |
data ColExpression = ColE ColName [OperationExpression] | |
data BoolExpression = BECol ColExpression | |
data BoolExpression | |
= BEAnd [BoolExpression] | |
| BEOr [BoolExpression] | |
| BENot BoolExpression | |
| BECol ColExpression |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query { | |
users { | |
firstName | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
region = "${var.region}" | |
} | |
### VPC | |
# Fetch AZs in the current region | |
data "aws_availability_zones" "available" {} | |
resource "aws_vpc" "datastore" { | |
cidr_block = "172.17.0.0/16" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation($message: messages_insert_input!) { | |
insert_messages(objects:[$message]) { | |
returning { | |
id | |
sender_id | |
message | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation($message: messages_insert_input!) { | |
insert_messages(objects:[$message]) { | |
returning { | |
id | |
sender_id | |
message | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"user": [ | |
{ | |
"id": 456, | |
"name": "Sita K", | |
"address": { | |
"country": "India" | |
} | |
}, | |
{ |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- -- /******************************************************************************* | |
-- -- Chinook Database - Version 1.4 | |
-- -- Script: Chinook_PostgreSql.sql | |
-- -- Description: Creates and populates the Chinook database. | |
-- -- DB Server: PostgreSql | |
-- -- Author: Luis Rocha | |
-- -- License: http://www.codeplex.com/ChinookDatabase/license | |
-- -- Modified By: John Atten |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Without query variables | |
mutation updateChildren { | |
delete_children(where: {parent_id: {_eq: 1}}) { | |
affected_rows | |
} | |
insert_children(objects: [{name: "child1", parent_id: 1}, {name: "child2", parent_id: 1}]) { | |
affected_rows | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
#Fetch existing tables | |
tables = requests.post('http://localhost:8080/v1/query', json={ | |
"type":"select", | |
"args":{ | |
"table": {"schema": "information_schema", "name": "tables"}, | |
"columns": ["table_name"], | |
"where": {"table_schema": {"$eq": "public"}} | |
} |