We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Alasql can precompile statements. It is a kind a "prepare" in other SQL databases.
To compile statement use:
var stmt = alasql.compile(sql)
Then run the statement:
stmt([parameters array], callback)
Here is the example how to calculate sum of numbers > 2 from [1,2,3,4,5]:
var data = [{a:1},{a:2},{a:3},{a:4},{a:5}]; // Compile var mysum = alasql.compile("SELECT VALUE SUM(a) FROM ? WHERE a > 2"); // Run var res = mysum([data])
Try this example in jsFiddle
Quick links
AlaSQL wiki frontpage
About AlaSQL
Install AlaSQL
Get started with AlaSQL