Changeset: e511aff447d6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e511aff447d6
Modified Files:
clients/odbc/driver/ODBCUtil.c
Branch: Aug2018
Log Message:
Sort functions and add schema.
diffs (154 lines):
diff --git a/clients/odbc/driver/ODBCUtil.c b/clients/odbc/driver/ODBCUtil.c
--- a/clients/odbc/driver/ODBCUtil.c
+++ b/clients/odbc/driver/ODBCUtil.c
@@ -325,82 +325,82 @@ static struct scalars {
int nargs;
const char *repl;
} scalars[] = {
- {"ascii", 1, "\"ascii\"(\1)", },
+ {"abs", 1, "sys.\"abs\"(\1)", },
+ {"acos", 1, "sys.\"acos\"(\1)", },
+ {"ascii", 1, "sys.\"ascii\"(\1)", },
+ {"asin", 1, "sys.\"asin\"(\1)", },
+ {"atan", 1, "sys.\"atan\"(\1)", },
+ {"atan2", 2, "sys.\"atan\"(\1,\2)", }, /* note: not atan2 */
{"bit_length", 1, NULL, },
- {"char", 1, "\"code\"(\1)", },
- {"char_length", 1, "\"char_length\"(\1)", },
- {"character_length", 1, "\"character_length\"(\1)", },
- {"concat", 2, "\"concat\"(\1,\2)", },
- {"difference", 2, "\"difference\"(\1,\2)", },
- {"insert", 4, "\"insert\"(\1,\2,\3,\4)", },
- {"lcase", 1, "\"lcase\"(\1)", },
- {"left", 2, "\"left\"(\1,\2)", },
- {"length", 1, "\"length\"(\1)", },
- {"locate", 2, "\"locate\"(\1,\2)", },
- {"locate", 3, "\"locate\"(\1,\2,\3)", },
- {"ltrim", 1, "\"ltrim\"(\1)", },
- {"octet_length", 1, "\"octet_length\"(\1)", },
- {"position", 1, "\"position\"(\1)", }, /* includes "IN" in argument */
- {"repeat", 2, "\"repeat\"(\1,\2)", },
- {"replace", 3, "\"replace\"(\1,\2,\3)", },
- {"right", 2, "\"right\"(\1,\2)", },
- {"rtrim", 1, "\"rtrim\"(\1)", },
- {"soundex", 1, "\"soundex\"(\1)", },
- {"space", 1, "\"space\"(\1)", },
- {"substring", 3, "\"substring\"(\1,\2,\3)", },
- {"ucase", 1, "\"ucase\"(\1)", },
- {"abs", 1, "\"abs\"(\1)", },
- {"acos", 1, "\"acos\"(\1)", },
- {"asin", 1, "\"asin\"(\1)", },
- {"atan", 1, "\"atan\"(\1)", },
- {"atan2", 2, "\"atan\"(\1,\2)", }, /* note: not atan2 */
- {"ceiling", 1, "\"ceiling\"(\1)", },
- {"cos", 1, "\"cos\"(\1)", },
- {"cot", 1, "\"cot\"(\1)", },
- {"degrees", 1, "\"sys\".\"degrees\"(\1)", },
- {"exp", 1, "\"exp\"(\1)", },
- {"floor", 1, "\"floor\"(\1)", },
- {"log", 1, "\"log\"(\1)", },
- {"log10", 1, "\"log10\"(\1)", },
- {"mod", 2, "\"mod\"(\1,\2)", },
- {"pi", 0, "\"pi\"()", },
- {"power", 2, "\"power\"(\1,\2)", },
- {"radians", 1, "\"sys\".\"radians\"(\1)", },
- {"rand", 0, "\"rand\"()", },
- {"rand", 1, "\"rand\"(\1)", },
- {"round", 2, "\"round\"(\1,\2)", },
- {"sign", 1, "\"sign\"(\1)", },
- {"sin", 1, "\"sin\"(\1)", },
- {"sqrt", 1, "\"sqrt\"(\1)", },
- {"tan", 1, "\"tan\"(\1)", },
- {"truncate", 2, "\"ms_trunc\"(\1,\2)", },
- {"current_date", 0, "\"current_date\"()", },
- {"current_time", 0, "\"current_time\"()", },
+ {"ceiling", 1, "sys.\"ceiling\"(\1)", },
+ {"char", 1, "sys.\"code\"(\1)", },
+ {"character_length", 1, "sys.\"character_length\"(\1)", },
+ {"char_length", 1, "sys.\"char_length\"(\1)", },
+ {"concat", 2, "sys.\"concat\"(\1,\2)", },
+ {"convert", 2, NULL, },
+ {"cos", 1, "sys.\"cos\"(\1)", },
+ {"cot", 1, "sys.\"cot\"(\1)", },
+ {"curdate", 0, "sys.\"curdate\"()", },
+ {"current_date", 0, "sys.\"current_date\"()", },
+ {"current_time", 0, "sys.\"current_time\"()", },
{"current_time", 1, NULL, },
- {"current_timestamp", 0, "\"current_timestamp\"()", },
+ {"current_timestamp", 0, "sys.\"current_timestamp\"()", },
{"current_timestamp", 1, NULL, },
- {"curdate", 0, "\"curdate\"()", },
- {"curtime", 0, "\"curtime\"()", },
+ {"curtime", 0, "sys.\"curtime\"()", },
+ {"database", 0, NULL, },
{"dayname", 1, NULL, },
- {"dayofmonth", 1, "\"dayofmonth\"(\1)", },
- {"dayofweek", 1, "\"dayofweek\"(\1)", },
- {"dayofyear", 1, "\"dayofyear\"(\1)", },
- {"extract", 1, "\"extract\"(\1)", }, /* include "X FROM " in argument */
- {"hour", 1, "\"hour\"(\1)", },
- {"minute", 1, "\"minute\"(\1)", },
- {"month", 1, "\"month\"(\1)", },
+ {"dayofmonth", 1, "sys.\"dayofmonth\"(\1)", },
+ {"dayofweek", 1, "sys.\"dayofweek\"(\1)", },
+ {"dayofyear", 1, "sys.\"dayofyear\"(\1)", },
+ {"degrees", 1, "sys.\"sys\".\"degrees\"(\1)", },
+ {"difference", 2, "sys.\"difference\"(\1,\2)", },
+ {"exp", 1, "sys.\"exp\"(\1)", },
+ {"extract", 1, "sys.\"extract\"(\1)", }, /* include "X FROM " in
argument */
+ {"floor", 1, "sys.\"floor\"(\1)", },
+ {"hour", 1, "sys.\"hour\"(\1)", },
+ {"ifnull", 2, "sys.\"coalesce\"(\1,\2)", },
+ {"insert", 4, "sys.\"insert\"(\1,\2,\3,\4)", },
+ {"lcase", 1, "sys.\"lcase\"(\1)", },
+ {"left", 2, "sys.\"left\"(\1,\2)", },
+ {"length", 1, "sys.\"length\"(\1)", },
+ {"locate", 2, "sys.\"locate\"(\1,\2)", },
+ {"locate", 3, "sys.\"locate\"(\1,\2,\3)", },
+ {"log10", 1, "sys.\"log10\"(\1)", },
+ {"log", 1, "sys.\"log\"(\1)", },
+ {"ltrim", 1, "sys.\"ltrim\"(\1)", },
+ {"minute", 1, "sys.\"minute\"(\1)", },
+ {"mod", 2, "sys.\"mod\"(\1,\2)", },
+ {"month", 1, "sys.\"month\"(\1)", },
{"monthname", 1, NULL, },
- {"now", 0, "\"now\"()", },
- {"quarter", 1, "\"quarter\"(\1)", },
- {"second", 1, "\"second\"(\1)", },
+ {"now", 0, "sys.\"now\"()", },
+ {"octet_length", 1, "sys.\"octet_length\"(\1)", },
+ {"pi", 0, "sys.\"pi\"()", },
+ {"position", 1, "sys.\"position\"(\1)", }, /* includes "IN" in argument
*/
+ {"power", 2, "sys.\"power\"(\1,\2)", },
+ {"quarter", 1, "sys.\"quarter\"(\1)", },
+ {"radians", 1, "sys.\"sys\".\"radians\"(\1)", },
+ {"rand", 0, "sys.\"rand\"()", },
+ {"rand", 1, "sys.\"rand\"(\1)", },
+ {"repeat", 2, "sys.\"repeat\"(\1,\2)", },
+ {"replace", 3, "sys.\"replace\"(\1,\2,\3)", },
+ {"right", 2, "sys.\"right\"(\1,\2)", },
+ {"round", 2, "sys.\"round\"(\1,\2)", },
+ {"rtrim", 1, "sys.\"rtrim\"(\1)", },
+ {"second", 1, "sys.\"second\"(\1)", },
+ {"sign", 1, "sys.\"sign\"(\1)", },
+ {"sin", 1, "sys.\"sin\"(\1)", },
+ {"soundex", 1, "sys.\"soundex\"(\1)", },
+ {"space", 1, "sys.\"space\"(\1)", },
+ {"sqrt", 1, "sys.\"sqrt\"(\1)", },
+ {"substring", 3, "sys.\"substring\"(\1,\2,\3)", },
+ {"tan", 1, "sys.\"tan\"(\1)", },
{"timestampadd", 3, NULL, },
{"timestampdiff", 3, NULL, },
- {"week", 1, "\"week\"(\1)", },
- {"year", 1, "\"year\"(\1)", },
- {"database", 0, NULL, },
- {"ifnull", 2, "\"coalesce\"(\1,\2)", },
+ {"truncate", 2, "sys.\"ms_trunc\"(\1,\2)", },
+ {"ucase", 1, "sys.\"ucase\"(\1)", },
{"user", 0, NULL, },
- {"convert", 2, NULL, },
+ {"week", 1, "sys.\"week\"(\1)", },
+ {"year", 1, "sys.\"year\"(\1)", },
{NULL, 0, NULL, }, /* sentinel */
};
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list