Fields

varchar

Creates varchar (character string) type column in SQLite.

OEColumn column = new OEColumn("field_name", "Label", OEFields.varchar(30));

integer

Creates integer type column in SQLite.

OEColumn column = new OEColumn("field_name", "Label", OEFields.integer(5));

real

Creates real (float) type column in SQLite.

OEColumn column = new OEColumn("field_name", "Label", OEFields.real());

booleantype

Creates boolean type column in SQLite.

OEColumn column = new OEColumn("field_name", "Label", OEFields.booleantype());

timestamp

Creates timestamp (datetime with default current datetime value) type column in SQLite.

OEColumn column = new OEColumn("field_name", "Label", OEFields.timestamp(OEDate.DEFAULT_FORMAT));

datetime

Creates datetime type column in SQLite.

OEColumn column = new OEColumn("field_name", "Label", OEFields.datetime(date_format));

text

Creates text type column in SQLite.

OEColumn column = new OEColumn("field_name", "Label", OEFields.text());

oneToMany

Creates oneToMany relation with column. Used with OpenERP Android framework ORM

OEColumn column = new OEColumn("field_name", "Label", OEFields.oneToMany(new ModelObject(context));

manyToOne

Creates manyToOne relation with column and also create integer type column in SQLite. Used with OpenERP Android framework ORM.

OEColumn column = new OEColumn("field_name", "Label", OEFields.manyToOne(new ModelObject(context));

manyToMany

Creates manyToMany relation with column and create many2many related third table in SQLite based on primary column id. Used with framework ORM.

OEColumn column = new OEColumn("field_name", "Label", OEFields.manyToMany(new ModelObject(context));

blob

Creates blob column in SQLite used to store Base64 String.

OEColumn column = new OEColumn("field_name", "Label", OEFields.blob());
comments powered by Disqus