method Query.run
Executes the query; panics on a database failure.
Example:
use std.orm { Db }
@table("items")
data Item {
@pk id: i64
name: str
price: i64
}
fn main() io, db {
let db = Db.open("sqlite::memory:")!
db.insert(Item{ id: 1, name: "tea", price: 3 })
for it in db.Item.query().run() {
print(it.name)
}
db.close()
}Output
tea
pub(api) fn run() -> List<T> dbComplexity. O(rows returned) plus the cost of the query in the database.
Since. 1.0.0-beta
Returns
List<T>
Effects
db
Defined in: std/orm/orm.oxl:947