7#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
39 char command [ 512 ] ;
76 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"create table customers ( customer_id integer primary key , name varchar , address varchar )",
ECPGt_EOIT,
ECPGt_EORT);
90 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"create table customer_orders ( customer_orders_id integer primary key , customer_id integer references customers ( customer_id ) , order_id integer references orders ( order_id ) )",
ECPGt_EOIT,
ECPGt_EORT);
98 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"insert into customers values ( 1 , 'customer1' , 'US' ) , ( 2 , 'customer2' , 'CA' ) , ( 3 , 'customer3' , 'GL' )",
ECPGt_EOIT,
ECPGt_EORT);
104 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"insert into orders values ( 1 , 100 ) , ( 2 , 200 ) , ( 3 , 500 )",
ECPGt_EOIT,
ECPGt_EORT);
110 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"insert into customer_orders ( customer_orders_id , customer_id , order_id ) values ( 1 , 1 , 1 ) , ( 2 , 2 , 2 ) , ( 3 , 3 , 3 )",
ECPGt_EOIT,
ECPGt_EORT);
118 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"create property graph shopgraph vertex tables ( customers , orders ) edge tables ( customer_orders key ( customer_orders_id ) source key ( customer_id ) references customers ( customer_id ) destination key ( order_id ) references orders ( order_id ) )",
ECPGt_EOIT,
ECPGt_EORT);
133 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"select * from graph_table ( shopgraph match ( c is customers where c . address = 'US' ) - [ is customer_orders ] -> ( o is orders ) columns ( c . name , o . register ) )",
ECPGt_EOIT,
136 ECPGt_int,&(reg),(
long)1,(
long)1,
sizeof(
int),
147 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"select * from graph_table ( shopgraph match ( c is customers where c . address = $1 ) - [ is customer_orders ] -> ( o is orders ) columns ( c . name , o . register ) )",
152 ECPGt_int,&(reg),(
long)1,(
long)1,
sizeof(
int),
162 sprintf(command,
"select * from graph_table (shopgraph match (c is customers where c.address = $1)-[is customer_orders]->(o is orders) columns (c.name, o.register))");
175 ECPGt_int,&(reg),(
long)1,(
long)1,
sizeof(
int),
194 {
ECPGdo(
__LINE__, 0, 1,
NULL, 0,
ECPGst_normal,
"declare graph_cursor cursor for select * from graph_table ( shopgraph match ( c is customers ) - [ is customer_orders ] -> ( o is orders ) columns ( c . name , o . register ) ) order by name",
ECPGt_EOIT,
ECPGt_EORT);
207 ECPGt_int,&(reg),(
long)1,(
long)1,
sizeof(
int),
266#line 100 "sqlpgq.pgc"
269#line 100 "sqlpgq.pgc"
272#line 101 "sqlpgq.pgc"
275#line 101 "sqlpgq.pgc"
278#line 102 "sqlpgq.pgc"
281#line 102 "sqlpgq.pgc"
bool ECPGdisconnect(int lineno, const char *connection_name)
bool ECPGconnect(int lineno, int c, const char *name, const char *user, const char *passwd, const char *connection_name, int autocommit)
bool ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
bool ECPGtrans(int lineno, const char *connection_name, const char *transaction)
bool ECPGprepare(int lineno, const char *connection_name, const bool questionmarks, const char *name, const char *variable)
bool ECPGdeallocate(int lineno, int c, const char *connection_name, const char *name)