chore: JSPG Engine tuple decoupling and core routing optimizations
This commit is contained in:
@ -5,66 +5,60 @@
|
||||
"puncs": [
|
||||
{
|
||||
"name": "get_organization",
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "get_organization.response",
|
||||
"schemas": {
|
||||
"get_organization.response": {
|
||||
"type": "organization"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "get_organizations",
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "get_organizations.response",
|
||||
"schemas": {
|
||||
"get_organizations.response": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$family": "organization"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "get_light_organization",
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "get_light_organization.response",
|
||||
"schemas": {
|
||||
"get_light_organization.response": {
|
||||
"$family": "light.organization"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "get_full_organization",
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "get_full_organization.response",
|
||||
"schemas": {
|
||||
"get_full_organization.response": {
|
||||
"$family": "full.organization"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "get_orders",
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "get_orders.response",
|
||||
"schemas": {
|
||||
"get_orders.response": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "light.order"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "get_widgets",
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "get_widgets.response",
|
||||
"schemas": {
|
||||
"get_widgets.response": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$family": "widget"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"enums": [],
|
||||
@ -165,9 +159,8 @@
|
||||
"created_at": "timestamptz",
|
||||
"type": "text"
|
||||
},
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "entity",
|
||||
"schemas": {
|
||||
"entity": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
@ -189,7 +182,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
"fields": [
|
||||
"id",
|
||||
"type",
|
||||
@ -256,9 +249,8 @@
|
||||
"organization",
|
||||
"person"
|
||||
],
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "organization",
|
||||
"schemas": {
|
||||
"organization": {
|
||||
"type": "entity",
|
||||
"properties": {
|
||||
"name": {
|
||||
@ -266,7 +258,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "bot",
|
||||
@ -309,9 +301,8 @@
|
||||
"role": "text",
|
||||
"created_at": "timestamptz"
|
||||
},
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "bot",
|
||||
"schemas": {
|
||||
"bot": {
|
||||
"type": "organization",
|
||||
"properties": {
|
||||
"token": {
|
||||
@ -322,8 +313,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$id": "light.bot",
|
||||
"light.bot": {
|
||||
"type": "organization",
|
||||
"properties": {
|
||||
"token": {
|
||||
@ -331,7 +321,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
"variations": [
|
||||
"bot"
|
||||
]
|
||||
@ -379,9 +369,8 @@
|
||||
"age": "numeric",
|
||||
"created_at": "timestamptz"
|
||||
},
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "person",
|
||||
"schemas": {
|
||||
"person": {
|
||||
"type": "organization",
|
||||
"properties": {
|
||||
"first_name": {
|
||||
@ -395,8 +384,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$id": "light.person",
|
||||
"light.person": {
|
||||
"type": "organization",
|
||||
"properties": {
|
||||
"first_name": {
|
||||
@ -407,8 +395,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$id": "full.person",
|
||||
"full.person": {
|
||||
"type": "person",
|
||||
"properties": {
|
||||
"phone_numbers": {
|
||||
@ -467,7 +454,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
"variations": [
|
||||
"person"
|
||||
]
|
||||
@ -513,13 +500,12 @@
|
||||
"target_type": "text",
|
||||
"created_at": "timestamptz"
|
||||
},
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "relationship",
|
||||
"schemas": {
|
||||
"relationship": {
|
||||
"type": "entity",
|
||||
"properties": {}
|
||||
}
|
||||
],
|
||||
},
|
||||
"variations": [
|
||||
"contact",
|
||||
"relationship"
|
||||
@ -572,9 +558,8 @@
|
||||
"is_primary": "boolean",
|
||||
"created_at": "timestamptz"
|
||||
},
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "contact",
|
||||
"schemas": {
|
||||
"contact": {
|
||||
"type": "relationship",
|
||||
"properties": {
|
||||
"is_primary": {
|
||||
@ -582,7 +567,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
"variations": [
|
||||
"contact"
|
||||
]
|
||||
@ -618,9 +603,8 @@
|
||||
"number": "text",
|
||||
"created_at": "timestamptz"
|
||||
},
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "phone_number",
|
||||
"schemas": {
|
||||
"phone_number": {
|
||||
"type": "entity",
|
||||
"properties": {
|
||||
"number": {
|
||||
@ -628,7 +612,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
"variations": [
|
||||
"phone_number"
|
||||
]
|
||||
@ -664,9 +648,8 @@
|
||||
"address": "text",
|
||||
"created_at": "timestamptz"
|
||||
},
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "email_address",
|
||||
"schemas": {
|
||||
"email_address": {
|
||||
"type": "entity",
|
||||
"properties": {
|
||||
"address": {
|
||||
@ -674,7 +657,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
"variations": [
|
||||
"email_address"
|
||||
]
|
||||
@ -710,9 +693,8 @@
|
||||
"city": "text",
|
||||
"created_at": "timestamptz"
|
||||
},
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "address",
|
||||
"schemas": {
|
||||
"address": {
|
||||
"type": "entity",
|
||||
"properties": {
|
||||
"city": {
|
||||
@ -720,16 +702,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
"variations": [
|
||||
"address"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "order",
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "order",
|
||||
"schemas": {
|
||||
"order": {
|
||||
"type": "entity",
|
||||
"properties": {
|
||||
"total": {
|
||||
@ -740,8 +721,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$id": "light.order",
|
||||
"light.order": {
|
||||
"type": "order",
|
||||
"properties": {
|
||||
"customer": {
|
||||
@ -749,8 +729,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$id": "full.order",
|
||||
"full.order": {
|
||||
"type": "order",
|
||||
"properties": {
|
||||
"customer": {
|
||||
@ -764,7 +743,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
"hierarchy": [
|
||||
"order",
|
||||
"entity"
|
||||
@ -825,9 +804,8 @@
|
||||
},
|
||||
{
|
||||
"name": "order_line",
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "order_line",
|
||||
"schemas": {
|
||||
"order_line": {
|
||||
"type": "entity",
|
||||
"properties": {
|
||||
"order_id": {
|
||||
@ -841,7 +819,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
"hierarchy": [
|
||||
"order_line",
|
||||
"entity"
|
||||
@ -929,9 +907,8 @@
|
||||
"variations": [
|
||||
"widget"
|
||||
],
|
||||
"schemas": [
|
||||
{
|
||||
"$id": "widget",
|
||||
"schemas": {
|
||||
"widget": {
|
||||
"type": "entity",
|
||||
"properties": {
|
||||
"kind": {
|
||||
@ -939,25 +916,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$id": "stock.widget",
|
||||
"stock.widget": {
|
||||
"type": "widget",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"const": "stock"
|
||||
}
|
||||
}
|
||||
"properties": {}
|
||||
},
|
||||
{
|
||||
"$id": "tasks.widget",
|
||||
"tasks.widget": {
|
||||
"type": "widget",
|
||||
"properties": {
|
||||
"kind": {
|
||||
"const": "tasks"
|
||||
}
|
||||
}
|
||||
"properties": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1506,7 +1473,7 @@
|
||||
"success": true,
|
||||
"sql": [
|
||||
[
|
||||
"(SELECT jsonb_strip_nulls((SELECT jsonb_build_object(",
|
||||
"(SELECT jsonb_strip_nulls((SELECT COALESCE(jsonb_agg(jsonb_build_object(",
|
||||
" 'archived', entity_3.archived,",
|
||||
" 'created_at', entity_3.created_at,",
|
||||
" 'id', entity_3.id,",
|
||||
@ -1525,7 +1492,7 @@
|
||||
" NOT entity_5.archived",
|
||||
" AND relationship_2.target_id = entity_5.id),",
|
||||
" 'type', entity_3.type",
|
||||
")",
|
||||
")), '[]'::jsonb)",
|
||||
"FROM agreego.contact contact_1",
|
||||
"JOIN agreego.relationship relationship_2 ON relationship_2.id = contact_1.id",
|
||||
"JOIN agreego.entity entity_3 ON entity_3.id = relationship_2.id",
|
||||
|
||||
Reference in New Issue
Block a user