class
CQL::Postgres::PipelineResult
- CQL::Postgres::PipelineResult
- Reference
- Object
Overview
The rows one pipelined statement returned, readable like a query's:
engine = CQL::Postgres::AsyncEngine.connect(ENV["DATABASE_URL"])
results = engine.pipeline([User.query.where(active: true), Post.query])
results[0].as(CQL::Postgres::PipelineResult).all(as: User)
Defined in:
postgres/pipeline_result.crConstructors
Instance Method Summary
-
#all(as kind : T.class) : Array(T) forall T
Every row mapped to kind (a class,
DB::Serializablemodel included). -
#all(as kinds : Tuple) : Array
Every row as a tuple of the given types:
all(as: {Int32, String}). - #get(as kind : T.class) : T | Nil forall T
- #get!(as kind : T.class) : T forall T
- #result : Result
- #rows_affected : Int64
Constructor Detail
Instance Method Detail
Every row mapped to kind (a class, DB::Serializable model included).
def all(as kinds : Tuple) : Array
#
Every row as a tuple of the given types: all(as: {Int32, String}).