static function lessql() { if (self::$db) { return self::$db; } self::$db = new \LessQL\Database(self::pdo()); self::$db->setAlias('author', 'user'); self::$db->setAlias('editor', 'user'); self::$db->setPrimary('categorization', array('category_id', 'post_id')); self::$db->setAlias('edit_post', 'post'); self::$db->setBackReference('user', 'edit_post', 'editor_id'); }