usql update

usql is still very primitive..it just barely works
This commit is contained in:
2021-07-23 00:00:39 +02:00
parent 4f113ab2c5
commit 5005644d98
26 changed files with 877 additions and 472 deletions

8
ml.cpp
View File

@@ -1926,14 +1926,12 @@ MlValue throw_exception(std::vector<MlValue> args, MlEnvironment &env) {
}
MlValue usql(std::vector<MlValue> args, MlEnvironment &env) {
eval_args(args, env);
if (args.size() != 1)
throw MlError(MlValue("usql", throw_exception), env, args.size() > 1 ? TOO_MANY_ARGS : TOO_FEW_ARGS);
try {
return uSQL::instance().execute(args[0].as_string());
} catch (std::exception &e) {
return MlValue::nil();
}
return uSQL::instance().execute(args[0].as_string());
}
} // namespace builtin