We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Onyx::SQL::Repository#db
DB::Transaction
1 parent ec866c9 commit c320430Copy full SHA for c320430
src/onyx-sql/repository.cr
@@ -32,6 +32,10 @@ module Onyx::SQL
32
def initialize(@db : ::DB::Database | ::DB::Connection, @logger : Logger = Logger::Standard.new)
33
end
34
35
+ def db=(transaction : ::DB::Transaction)
36
+ self.db = transaction.connection
37
+ end
38
+
39
protected def postgresql?
40
{% if Object.all_subclasses.any? { |sc| sc.stringify == "PG::Driver" } %}
41
return db.is_a?(PG::Driver)
0 commit comments