Qore SqlUtil Module Reference 1.9.1
Loading...
Searching...
No Matches
SQL Insert Operator Functions

Functions

hash< InsertOperatorInfoSqlUtil::iop_seq (string arg)
 returns an InsertOperatorInfo hash for retrieving the value of the given sequence in insert queries More...
 
hash< InsertOperatorInfoSqlUtil::iop_seq_currval (string arg)
 returns an InsertOperatorInfo hash for retrieving the current value of the given sequence in insert queries More...
 
hash< InsertOperatorInfoSqlUtil::make_iop (string iop, auto arg)
 

Detailed Description

These are functions that can be used to give special values in insert queries

Function Documentation

◆ iop_seq()

hash< InsertOperatorInfo > SqlUtil::iop_seq ( string  arg)

returns an InsertOperatorInfo hash for retrieving the value of the given sequence in insert queries

Example:
table.insert(("id": id, "ref": iop_seq("xid")));
Parameters
argthe name of the sequence whose value should be inserted into the column
Returns
an InsertOperatorInfo hash corresponding to the arguments for use in insert queries

◆ iop_seq_currval()

hash< InsertOperatorInfo > SqlUtil::iop_seq_currval ( string  arg)

returns an InsertOperatorInfo hash for retrieving the current value of the given sequence in insert queries

Example:
table.insert(("id": id, "ref": iop_seq("xid"), "ref2": iop_seq_currval("xid")));
Parameters
argthe name of the sequence whose current value should be inserted into the column
Returns
an InsertOperatorInfo hash corresponding to the arguments for use in insert queries

◆ make_iop()

hash< InsertOperatorInfo > SqlUtil::make_iop ( string  iop,
auto  arg 
)

returns an InsertOperatorInfo hash

Parameters
iopthe value operator (one of SQL Insert Operators)
argthe argument to the operator
Returns
an InsertOperatorInfo hash corresponding to the arguments for use as values in insert queries
Note
Normally this function is not called directly, but rather by the other insert operator functions