# Pastebin 7z2uByGj diff --git a/lib/Red/Do.rakumod b/lib/Red/Do.rakumod index 62c6fb2..332f24d 100644 --- a/lib/Red/Do.rakumod +++ b/lib/Red/Do.rakumod @@ -16,7 +16,7 @@ multi red-defaults-from-config() is export { if "./.red.json".IO.f { return red-defaults-from-config "./.red.json" } - X::Red::Defaults::FromConfNotFound.new(:file<./.red.json>).throw + X::Red::Defaults::FromConfNotFound.new(:file("./.red.json")).throw } #| Loads Red configuration (mostly the database connection) diff --git a/lib/Red/ResultSeq.rakumod b/lib/Red/ResultSeq.rakumod index 6822380..c42a497 100644 --- a/lib/Red/ResultSeq.rakumod +++ b/lib/Red/ResultSeq.rakumod @@ -195,7 +195,7 @@ multi method first(--> Red::Model) is hidden-from-sql-commenting { } #multi method create-map($, :&filter) { self.do-it.map: &filter } -multi method create-map(\SELF: Red::Model $model is copy, :filter(&)) is hidden-from-sql-commenting { +multi method create-map(\SELF: Red::Model $model is copy, :filter(&x)) is hidden-from-sql-commenting { self but role :: { method of { $model } } } multi method create-map(\SELF: *@ret where .all ~~ Red::AST, :&filter) is hidden-from-sql-commenting { @@ -335,13 +335,13 @@ method from(UInt:D $num --> Red::ResultSeq) is hidden-from-sql-commenting { #| Returns the number of rows returned by the query (runs the query) method elems( --> Int()) is hidden-from-sql-commenting { self.create-comment-to-caller; - self.create-map(Red::AST::Function.new: :func, :args[ast-value *]).head + self.create-map(Red::AST::Function.new: :func, :args[ast-value(*)]).head } #| Returns True if there are lines returned by the query False otherwise (runs the query) method Bool( --> Bool()) is hidden-from-sql-commenting { self.create-comment-to-caller; - self.create-map(Red::AST::Gt.new: Red::AST::Function.new(:func, :args[ast-value *]), ast-value 0).head + self.create-map(Red::AST::Gt.new: Red::AST::Function.new(:func, :args[ast-value(*)]), ast-value 0).head } method new-object(::?CLASS:D: *%pars) is hidden-from-sql-commenting { @@ -465,7 +465,7 @@ method prefetch($defined? is copy, *%prefetches) { .name.substr(2) eq $defined.any } with $defined; - my :(:@add, :@del) := %prefetches.pairs.classify: { .value ?? "add" !! "del" }, :as{ .key }; + my (:@add, :@del) := %prefetches.pairs.classify: { .value ?? "add" !! "del" }, :as{ .key }; @prefetches.append: @.^attributes.grep: { .name.substr(2) eq @add.any