Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
$#!
 _populateFromResult, GearsORM. Model. model
 _updateInsert, GearsORM. Model. model
A
 add, GearsORM. Fields. ManyToMany
 addListener, GearsORM. Events
C
 close
 copy
 count, GearsORM. Model. model
 createTable
 createTriggers, GearsORM. Model. model
D
 doesTableExist, GearsORM. Introspection
 dropTable
 dropTriggers, GearsORM. Model. model
E
 each, GearsORM. ResultIterator
 execute, GearsORM
 executeAndClose, GearsORM
F
 fireEvent, GearsORM. Events
 Functions
G
 GearsORM
 GearsORM. Events
 GearsORM. Events.js
 GearsORM. Field. Primitive
 GearsORM. Fields.js
 GearsORM. Fields. ManyToMany
 GearsORM. Fields. ManyToOne
 GearsORM. Fields. OneToMany
 GearsORM. Introspection
 GearsORM. Introspection.js
 GearsORM.js
 GearsORM. Model
 GearsORM. Model.js
 GearsORM. Model. model
 GearsORM. ResultIterator
 GearsORM. ResultIterator.js
 GearsORM. Sql.js
 GearsORM. Transaction.js
 getDB, GearsORM
 getOne, GearsORM. ResultIterator
 getRelatedClass
L
 load, GearsORM. Model. model
N
 next, GearsORM. ResultIterator
P
 Properties, GearsORM. Introspection
R
 refresh, GearsORM. Model. model
 remove
 removeListener, GearsORM. Events
S
 save, GearsORM. Model. model
 select
 sqliteMasterModel, GearsORM. Introspection. GearsORM. Introspection
T
 toArray, GearsORM. ResultIterator
 toSql
 Transaction, GearsORM
W
 wrapFunction, GearsORM. Events
_populateFromResult:function(result)
populate the instance from a ResultSet.
_updateInsert:function(update)
do the actual insert/update,used by save method.
add:function(realtedObject)
add a relation between this object to another object
addListener:function(name,
fn)
add a listner on a specific event
close:function()
close the database connection.
close:function()
close the ResultSet,this will be done automaticlly if the ResultSet is iterated to the end.
copy:function()
create a copy of this object
copy:function()
create a copy of this object
copy:function()
create a copy of this object
count:function(whereExpression,
params)
do a COUNT on the model
createTable:function()
create the many to many table
createTable:function()
create the table for this model,creating triggers for forigenkeys and creating many-to-many tables if needed.
createTriggers:function()
create triggers to inforce forigenkeys.
doesTableExist:function()
get the names of the tables to checked if they exist return true if all of them exist else return false
dropTable:function()
drop the many to many table
dropTable:function()
drop the table and all associate triggers.
dropTriggers:function()
drop triggers related to the table.
each:function(fn,
bind)
a function to iterate the ResultSet like ruby each.
execute:function(sql,
params)
execute a sql query on the database
executeAndClose:function(sql,
params)
execute a sql query on the database and close it.
fireEvent:function(name,
args,
bind)
fires the event
the main namespace for GearsORM,also provide a basic api wrapper for execute,close and open
add event support to a class
Event support for GearsORM
a meta class for basic field types like varchar,integer,real and timestamp
Contains the fields to be used in the models.
represent a many to many relation between two tables using a many to many relation table
represent a ManyToOne relation,this isn`t a actual table field.
represent a forigen key relation
a utility class to do database introspection.
Contains the GearsORM.Introspection utility class, which contain also a model for sqlite_master table
Contains the main namespace for GearsORM and a thin abstraction for open,close and execute functions
a metaclass to define models that represent database tables.
Contains GearsORM.Model a metaclass used to define models
represent a model instance
a iterator on a Google Gears ResultSet
Contains the ResultIterator class.
Contains functions to generate sql
Contains a function to run queries in a transaction.
getDB:function()
return a open database connection
getOne:function()
return the first row of the ResultSet,will return false if the ResultSet is empty.
return the related model class
getRelatedClass:function()
return the related model class
getRelatedClass:function()
return the related model class
load:function(objects,
save)
load objects from a array to the database.
next:function()
return the next row in the ResultSet as a model instance,if it is the last row it will return false.
refresh:function()
refresh the model data from database.
remove:function(related)
delete a relation between this object and other object
remove:function(whereExpression,
params)
do a DELETE on the related table
remove:function()
remove the instance from the database
removeListener:function(name,
fn)
remove the listner on a specific event
save:function()
select:function(whereExpression,
params)
do a SELECT on the related table
select:function(whereExpression,
params)
do a SELECT on the related table
select:function(whereExpression,
params)
do a SELECT on the model
a model to work with sqlite_master(provide information on the schema) table sqlite_master definition from sqlite site: CREATE TABLE sqlite_master ( type TEXT, name TEXT, tbl_name TEXT, rootpage INTEGER, sql TEXT );
toArray:function()
return the ResultSet as Array of model instances
toSql:function()
return the sql string for this field
toSql:function()
return the sql string for this field
toSql:function()
return the sql string for this field
GearsORM.Transaction = function(fn,
bind)
execute a function while running queries in a transaction.
GearsORM.Events.wrapFunction=function(fn,
name,
object)
wrap a function with a onBefore and onAfter events