46 val->
s = (
char *)realloc(val->
s, len);
69 to->
s = strdup(from->
s);
80 sqlpStmt->
errmsg[0] =
'\0';
81 sqlpStmt->
table[0] =
'\0';
129 void sqpValue(
char *strval,
int intval,
double dblval,
int type)
141 sqlpStmt->
Val[i].
i = 0;
142 sqlpStmt->
Val[i].
d = 0.0;
150 sqlpStmt->
Val[i].
i = intval;
153 sqlpStmt->
Val[i].
d = dblval;
174 sqlpStmt->
Val[i].
i = 0;
175 sqlpStmt->
Val[i].
d = 0.0;
183 sqlpStmt->
Val[i].
i = intval;
186 sqlpStmt->
Val[i].
d = dblval;
189 sqlpStmt->
Val[i].
expr = expval;
253 np->
value.
s = strdup(strval);
288 *ptr = tolower(*ptr);
292 if (strcmp(oper,
"=") == 0)
294 else if (strcmp(oper,
"<") == 0)
296 else if (strcmp(oper,
"<=") == 0)
298 else if (strcmp(oper,
">") == 0)
300 else if (strcmp(oper,
">=") == 0)
302 else if (strcmp(oper,
"<>") == 0)
304 else if (strcmp(oper,
"~") == 0)
306 else if (strcmp(oper,
"+") == 0)
308 else if (strcmp(oper,
"-") == 0)
310 else if (strcmp(oper,
"*") == 0)
312 else if (strcmp(oper,
"/") == 0)
314 else if (strcmp(oper,
"and") == 0)
316 else if (strcmp(oper,
"or") == 0)
318 else if (strcmp(oper,
"not") == 0)
void sqpColumn(char *col)
#define SQLP_NODE_EXPRESSION
void sqpFreeNode(SQLPNODE *np)
SQLPNODE * sqpNewColumnNode(char *name)
int sqpInitParser(SQLPSTMT *st)
void sqpColumnDef(char *col, int type, int width, int decimals)
void sqpInitValue(SQLPVALUE *val)
char errmsg[SQLP_MAX_ERR+1]
char table[SQLP_MAX_TABLE+1]
char * sqpOperatorName(int oper)
int sqpOperatorCode(char *oper)
SQLPNODE * sqpNewValueNode(char *strval, int intval, double dblval, int type)
SQLPNODE * sqpNewNode(void)
int sqpAllocCol(SQLPSTMT *st, int n)
void sqpOrderColumn(char *col, int dir)
void sqpCopyValue(SQLPVALUE *from, SQLPVALUE *to)
int sqpAllocVal(SQLPSTMT *st, int n)
SQLPNODE * sqpNewExpressionNode(int oper, SQLPNODE *left, SQLPNODE *right)
int sqpSaveStr(SQLPVALUE *val, char *c)
void sqpAssignment(char *col, char *strval, int intval, double dblval, SQLPNODE *expval, int type)
void sqpValue(char *strval, int intval, double dblval, int type)
void sqpCommand(int command)