usql update
usql is still very primitive..it just barely works
This commit is contained in:
8
ml.cpp
8
ml.cpp
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user