/** * Returns all the column names of this table * * @return array */ static function &fields() { if (!self::$_fields) { self::$_fields = array('id' => array('name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Query ID'), 'description' => 'Query Id', 'required' => true), 'name' => array('name' => 'name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Query Name'), 'description' => 'Title of the query', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'machine_name' => array('name' => 'machine_name', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Machine Name'), 'description' => 'Used to run the query via cron/drush', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'description' => array('name' => 'description', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Query Description'), 'description' => 'Description of the query', 'maxlength' => 255, 'size' => CRM_Utils_Type::HUGE), 'query' => array('name' => 'query', 'type' => CRM_Utils_Type::T_TEXT, 'title' => ts('Query'), 'description' => 'The query to execute'), 'run_frequency' => array('name' => 'run_frequency', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Run Frequency'), 'description' => 'How often should this query be run'), 'last_run' => array('name' => 'last_run', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Last Run'), 'description' => 'UNIX timestamp for when this query last ran', 'default' => 'NULL'), 'scheduled_run' => array('name' => 'scheduled_run', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Next Run'), 'description' => 'UNIX timestamp for next execution'), 'is_active' => array('name' => 'is_active', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Active'), 'description' => 'Is the query active')); } return self::$_fields; }