lib/builder/batch.rb in prick-0.21.0 vs lib/builder/batch.rb in prick-0.21.1
- old
+ new
@@ -7,11 +7,11 @@
forward_to :builder, :conn
def kind() @nodes.first&.kind end
attr_reader :nodes
- def initialize(builder)
+ def initialize(builder)
@builder = builder
@nodes = []
end
def execute(&block)
@@ -30,9 +30,10 @@
class SqlBatch < BuildBatch
def execute
super {
begin
sql = []
+ # A SQL batch allows the first node to be an executable
if nodes.first.is_a?(ExeNode)
time "Execute script" do
sql = [nodes.first.source]
end
end