Function
Fast
Database:SelectAsync
Execute a select query asynchronously
Syntax
my_database:SelectAsync(query, callback = nil, parameters... = nil)
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
query
|
string | — | Query to execute |
callback
optional
|
function | nil |
Callback
Callback signature
function(rows, error)
|
parameters...
optional
|
any | nil |
Sequence of parameters to escape into the Query |
Examples
my_database:SelectAsync("SELECT * FROM MyTable WHERE name = :0 AND title = :1", function(rows)
Console.log(NanosTable.Dump(rows))
end, "Val", "AnotherVal")