- /**
- * return table definition for DB_DataObject
- *
- * DB_DataObject needs to know something about the table to manipulate
- * instances. This method provides all the DB_DataObject needs to know.
- *
- * @return array array of column definitions
- */
-
- function table()
- {
- return array('hashkey' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL,
- 'topic' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL,
- 'callback' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL,
- 'secret' => DB_DATAOBJECT_STR,
- 'lease' => DB_DATAOBJECT_INT,
- 'sub_start' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME,
- 'sub_end' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME,
- 'created' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL,
- 'modified' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL);
- }
-
- static function schemaDef()
- {
- return array(new ColumnDef('hashkey', 'char',
- /*size*/40,
- /*nullable*/false,
- /*key*/'PRI'),
- new ColumnDef('topic', 'varchar',
- /*size*/255,
- /*nullable*/false,
- /*key*/'KEY'),
- new ColumnDef('callback', 'varchar',
- 255, false),
- new ColumnDef('secret', 'text',
- null, true),
- new ColumnDef('lease', 'int',
- null, true),
- new ColumnDef('sub_start', 'datetime',
- null, true),
- new ColumnDef('sub_end', 'datetime',
- null, true),
- new ColumnDef('created', 'datetime',
- null, false),
- new ColumnDef('modified', 'datetime',
- null, false));
- }
-
- function keys()