The current @funsql builds a query object or defines a custom combinator. However, often you want to execute the query against a connection immediately. This would have a 2 argument version of funsql macro where the database is the 1st argument.
Here is an example of a single-argument version used to define a custom combinator.
@funsql count_records() = group().select(count())
The proposed two argument version would have the database as 1st argument.
@funsql eicu_db begin
from(patient)
count_records()
end
The current
@funsqlbuilds a query object or defines a custom combinator. However, often you want to execute the query against a connection immediately. This would have a 2 argument version of funsql macro where the database is the 1st argument.Here is an example of a single-argument version used to define a custom combinator.
The proposed two argument version would have the database as 1st argument.