Skip to content

Commit 1904c85

Browse files
authored
Readonly is now considered by exec.jl (#109)
1 parent 1e5103c commit 1904c85

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/exec.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ using RAI: Context, HTTPError, exec, load_config, show_result
1818

1919
include("parseargs.jl")
2020

21-
function run(database, engine, source; profile)
21+
function run(database, engine, source; profile="default", readonly=false)
2222
conf = load_config(; profile = profile)
2323
ctx = Context(conf)
24-
rsp = exec(ctx, database, engine, source)
24+
rsp = exec(ctx, database, engine, source; readonly=readonly)
2525
display(rsp)
2626
println()
2727
end
@@ -42,7 +42,7 @@ function main()
4242
source = open(args.file, "r")
4343
end
4444
isnothing(source) && return # nothing to execute
45-
run(args.database, args.engine, source; profile = args.profile)
45+
run(args.database, args.engine, source; profile = args.profile, readonly=args.readonly)
4646
catch e
4747
e isa HTTPError ? show(e) : rethrow()
4848
end

0 commit comments

Comments
 (0)