Contains the fields to be used in the models.
MIT-style license.
| GearsORM. Fields.js | Contains the fields to be used in the models. |
| GearsORM. Field. Primitive | a meta class for basic field types like varchar,integer,real and timestamp |
| GearsORM. Fields. ManyToOne | represent a ManyToOne relation,this isn`t a actual table field. |
| Functions | |
| copy | create a copy of this object |
| toSql | return the sql string for this field |
| select | do a SELECT on the related table |
| remove | do a DELETE on the related table |
| getRelatedClass | return the related model class |
| GearsORM. Fields. OneToMany | represent a forigen key relation |
| Functions | |
| copy | create a copy of this object |
| toSql | return the sql string for this field |
| getRelatedClass | return the related model class |
| GearsORM. Fields. ManyToMany | represent a many to many relation between two tables using a many to many relation table |
| Functions | |
| copy | create a copy of this object |
| getRelatedClass | return the related model class |
| add | add a relation between this object to another object |
| toSql | return the sql string for this field |
| createTable | create the many to many table |
| select | do a SELECT on the related table |
| remove | delete a relation between this object and other object |
| dropTable | drop the many to many table |
| getRelatedClass | return the related model class |
a meta class for basic field types like varchar,integer,real and timestamp
| sqlType | the sql string for the type |
represent a ManyToOne relation,this isn`t a actual table field.
| options | a object that look like this: { related:”name_of_the_related_table”, |
| onDeleteCascade:true/false | if true this will create triggers to emulate a ON DELETE CASCADE,if this is false it will do ON DELETE RESTRICT } |
select:function( whereExpression, params )
do a SELECT on the related table
| whereExpression | sql where expression |
| params | a array of bind parameters to be used in sql query |
remove:function( whereExpression, params )
do a DELETE on the related table
| whereExpression | sql where expression |
| params | a array of bind parameters to be used in sql query |
represent a forigen key relation
| options | a object that look like this: { related:”name_of_the_related_table”, onDeleteCascade:if true this will create triggers to emulate a ON DELETE CASCADE,if this is false it will do ON DELETE RESTRICT } |
| Functions | |
| copy | create a copy of this object |
| toSql | return the sql string for this field |
| getRelatedClass | return the related model class |
represent a many to many relation between two tables using a many to many relation table
| options | a object that look like this: { related:”name_of_the_related_table”, onDeleteCascade:if true this will create triggers to emulate a ON DELETE CASCADE,if this is false it will do ON DELETE RESTRICT } |
| Functions | |
| copy | create a copy of this object |
| getRelatedClass | return the related model class |
| add | add a relation between this object to another object |
| toSql | return the sql string for this field |
| createTable | create the many to many table |
| select | do a SELECT on the related table |
| remove | delete a relation between this object and other object |
| dropTable | drop the many to many table |
| getRelatedClass | return the related model class |
add:function( realtedObject )
add a relation between this object to another object
| realtedObject | a related model instance or a id of that object |
select:function( whereExpression, params )
do a SELECT on the related table
| whereExpression | sql where expression. |
| params | a array of bind parameters to be used in sql query. |
create a copy of this object
copy:function()
return the sql string for this field
toSql:function()
do a SELECT on the related table
select:function( whereExpression, params )
do a DELETE on the related table
remove:function( whereExpression, params )
return the related model class
getRelatedClass:function()
create a copy of this object
copy:function()
return the sql string for this field
toSql:function()
return the related model class
getRelatedClass:function()
create a copy of this object
copy:function()
add a relation between this object to another object
add:function( realtedObject )
return the sql string for this field
toSql:function()
create the many to many table
createTable:function()
do a SELECT on the related table
select:function( whereExpression, params )
delete a relation between this object and other object
remove:function( related )
drop the many to many table
dropTable:function()
return the related model class
getRelatedClass:function()