Skip to content

Instantly share code, notes, and snippets.

@nvcnvn
Created October 19, 2021 04:50
Show Gist options
  • Save nvcnvn/d73d441b7878c47e85a654eef61819db to your computer and use it in GitHub Desktop.
Save nvcnvn/d73d441b7878c47e85a654eef61819db to your computer and use it in GitHub Desktop.
{
"version":130003,
"stmts":[
{
"stmt":{
"SelectStmt":{
"targetList":[
{
"ResTarget":{
"val":{
"ColumnRef":{
"fields":[
{
"String":{
"str":"invoices"
}
},
{
"String":{
"str":"invoice_id"
}
}
],
"location":8
}
},
"location":8
}
},
{
"ResTarget":{
"val":{
"ColumnRef":{
"fields":[
{
"String":{
"str":"invoices"
}
},
{
"String":{
"str":"user_id"
}
}
],
"location":30
}
},
"location":30
}
},
{
"ResTarget":{
"val":{
"ColumnRef":{
"fields":[
{
"String":{
"str":"users"
}
},
{
"String":{
"str":"billing_address"
}
}
],
"location":49
}
},
"location":49
}
},
{
"ResTarget":{
"val":{
"ColumnRef":{
"fields":[
{
"String":{
"str":"invoices"
}
},
{
"String":{
"str":"amount"
}
}
],
"location":73
}
},
"location":73
}
}
],
"fromClause":[
{
"JoinExpr":{
"jointype":"JOIN_LEFT",
"larg":{
"RangeVar":{
"relname":"users",
"inh":true,
"relpersistence":"p",
"location":94
}
},
"rarg":{
"RangeVar":{
"relname":"invoices",
"inh":true,
"relpersistence":"p",
"location":110
}
},
"quals":{
"A_Expr":{
"kind":"AEXPR_OP",
"name":[
{
"String":{
"str":"="
}
}
],
"lexpr":{
"ColumnRef":{
"fields":[
{
"String":{
"str":"users"
}
},
{
"String":{
"str":"user_id"
}
}
],
"location":122
}
},
"rexpr":{
"ColumnRef":{
"fields":[
{
"String":{
"str":"invoices"
}
},
{
"String":{
"str":"user_id"
}
}
],
"location":138
}
},
"location":136
}
}
}
}
],
"whereClause":{
"BoolExpr":{
"boolop":"AND_EXPR",
"args":[
{
"A_Expr":{
"kind":"AEXPR_OP_ANY",
"name":[
{
"String":{
"str":"="
}
}
],
"lexpr":{
"ColumnRef":{
"fields":[
{
"String":{
"str":"users"
}
},
{
"String":{
"str":"user_id"
}
}
],
"location":161
}
},
"rexpr":{
"ParamRef":{
"number":1,
"location":181
}
},
"location":175
}
},
{
"A_Expr":{
"kind":"AEXPR_OP",
"name":[
{
"String":{
"str":"\u003e="
}
}
],
"lexpr":{
"ColumnRef":{
"fields":[
{
"String":{
"str":"invoices"
}
},
{
"String":{
"str":"created_at"
}
}
],
"location":189
}
},
"rexpr":{
"ParamRef":{
"number":2,
"location":212
}
},
"location":209
}
}
],
"location":185
}
},
"limitOption":"LIMIT_OPTION_DEFAULT",
"op":"SETOP_NONE"
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment