Class Index | File Index

Classes


Class Database

Each TurKit script file has a JavaScript database associated with it. This JavaScriptDatabase instance is called database.

You may think of a JavaScript Database as a JavaScript environment that is persisted on disk. Any query you make to the database is evaluated in the context of the database, the new state of the database is written to disk, and then the result is returned.
Defined in: Database.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
You probably want to use the global variable database.
Field Summary
Field Attributes Field Name and Description
 
A reference to the Java JavaScriptDatabase object associated with this TurKit file.
Method Summary
Method Attributes Method Name and Description
 
query(s)
Evaluates s in the context of the JavaScript database, and returns a deep clone of the result.
 
Evaluates s in the context of the JavaScript database, without change.
Class Detail
Database()
You probably want to use the global variable database.
Field Detail
database
A reference to the Java JavaScriptDatabase object associated with this TurKit file.
Method Detail
query(s)
Evaluates s in the context of the JavaScript database, and returns a deep clone of the result. Note that this function evaluates the string of JSON returned from the JavaScript database, and returns the result.
Parameters:
s

queryRaw(s)
Evaluates s in the context of the JavaScript database, without change. This version does not wrap your code in a function body. It also does not guarantee that the results will be persisted on disk before the function returns, so you should only use this for calls that read from the database. Note that this version still evaluates the string of JSON returned from the JavaScript database, and returns the result.
Parameters:
s

Documentation generated by JsDoc Toolkit 2.1.0 on Tue Jun 08 2010 19:53:20 GMT-0400 (EDT)