mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
hide #prepare from api.
This commit is contained in:
parent
6a5b2a8758
commit
782a2ee0e2
2 changed files with 2 additions and 7 deletions
|
@ -15,8 +15,6 @@ module DB
|
||||||
# Also override `#last_insert_id` to allow safe access to the last inserted id through this connection.
|
# Also override `#last_insert_id` to allow safe access to the last inserted id through this connection.
|
||||||
#
|
#
|
||||||
abstract class Connection
|
abstract class Connection
|
||||||
# TODO add IDLE status, for connection ppool management.
|
|
||||||
|
|
||||||
@closed = false
|
@closed = false
|
||||||
|
|
||||||
# Closes this connection.
|
# Closes this connection.
|
||||||
|
@ -36,7 +34,7 @@ module DB
|
||||||
close unless closed?
|
close unless closed?
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns an `Statement` with the prepared `query`
|
# :nodoc:
|
||||||
abstract def prepare(query) : Statement
|
abstract def prepare(query) : Statement
|
||||||
|
|
||||||
include QueryMethods
|
include QueryMethods
|
||||||
|
|
|
@ -29,10 +29,7 @@ module DB
|
||||||
@connection
|
@connection
|
||||||
end
|
end
|
||||||
|
|
||||||
# Prepares a `Statement`. The Statement must be closed explicitly
|
# :nodoc:
|
||||||
# after is not longer in use.
|
|
||||||
#
|
|
||||||
# Usually `#exec`, `#query` or `#scalar` should be used.
|
|
||||||
def prepare(query)
|
def prepare(query)
|
||||||
connection.prepare(query)
|
connection.prepare(query)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue