Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit11a6b43

Browse files
committed
fix#48 the running in world age error inRepo.query
1 parent3dddef9 commit11a6b43

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

‎src/Repo.jl‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ end
9696
functiondisconnect(; db::Union{Nothing, Connection}=nothing)
9797
if db===nothing
9898
connection=current_connection()
99-
disconnected= connection.loader.db_disconnect(connection.conn)
99+
disconnected=Base.invokelatest(connection.loader.db_disconnect,connection.conn)
100100
current[:connection]=nothing
101101
disconnected
102102
else
103-
db.loader.db_disconnect(db.conn)
103+
Base.invokelatest(db.loader.db_disconnect,db.conn)
104104
end
105105
end
106106

@@ -142,7 +142,7 @@ function query(stmt::Structured; db::Connection=current_connection())
142142
a= db.adapter
143143
sql= a.to_sql(stmt)
144144
print_debug_sql(db, stmt)
145-
db.loader.query(db.conn, sql)
145+
Base.invokelatest(db.loader.query,db.conn, sql)
146146
end
147147

148148
"""
@@ -190,7 +190,7 @@ function query(stmt::Structured, vals::Vector; db::Connection=current_connection
190190
a= db.adapter
191191
prepared= a.to_sql(stmt)
192192
print_debug_sql(db, stmt, vals)
193-
db.loader.query(db.conn, prepared, vals)
193+
Base.invokelatest(db.loader.query,db.conn, prepared, vals)
194194
end
195195

196196
### Repo.query - pk
@@ -312,7 +312,7 @@ function execute(stmt::Structured; db::Connection=current_connection())
312312
a= db.adapter
313313
sql= a.to_sql(stmt)
314314
print_debug_sql(db, stmt)
315-
db.loader.execute(db.conn, sql)
315+
Base.invokelatest(db.loader.execute,db.conn, sql)
316316
end
317317

318318
"""
@@ -322,7 +322,7 @@ function execute(stmt::Structured, vals::Vector; db::Connection=current_connecti
322322
a= db.adapter
323323
prepared= a.to_sql(stmt)
324324
print_debug_sql(db, stmt, vals)
325-
db.loader.execute(db.conn, prepared, vals)
325+
Base.invokelatest(db.loader.execute,db.conn, prepared, vals)
326326
end
327327

328328
"""
@@ -332,7 +332,7 @@ function execute(stmt::Structured, nts::Vector{<:NamedTuple}; db::Connection=cur
332332
a= db.adapter
333333
prepared= a.to_sql(stmt)
334334
print_debug_sql(db, stmt, nts)
335-
db.loader.execute(db.conn, prepared, nts)
335+
Base.invokelatest(db.loader.execute,db.conn, prepared, nts)
336336
end
337337

338338
execute(raw::Raw; db::Connection=current_connection())=execute([raw]; db=db)
@@ -408,7 +408,7 @@ end
408408

409409
# Repo.execute_result
410410
functionexecute_result(command::SQLKeyword; db::Connection=current_connection())::NamedTuple
411-
db.loader.execute_result(db.conn, command)
411+
Base.invokelatest(db.loader.execute_result,db.conn, command)
412412
end
413413

414414

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp