Skip to content

Commit

Permalink
(queries) expose raw query handle under table namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
caspiano committed Jun 11, 2019
1 parent 9b0c2eb commit 3fc9cb8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rethinkdb-orm/queries.cr
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ module RethinkORM::Queries
result.try(&.as_i) || 0
end

private def self.table_query
# Yield a RethinkDB handle namespaced under the document table
#
def self.table_query
Connection.raw do |q|
yield q.table(@@table_name)
end
Expand Down

0 comments on commit 3fc9cb8

Please sign in to comment.