Query/classes/idb_sql.php

124 lines
2.0 KiB
PHP
Raw Normal View History

2012-04-10 14:06:34 -04:00
<?php
/**
* Query
*
* Free Query Builder / Database Abstraction Layer
*
2012-04-20 13:17:39 -04:00
* @author Timothy J. Warren
2014-01-02 12:36:50 -05:00
* @copyright Copyright (c) 2012 - 2014
2012-04-10 14:06:34 -04:00
* @link https://github.com/aviat4ion/Query
2012-04-20 13:17:39 -04:00
* @license http://philsturgeon.co.uk/code/dbad-license
* @package Query
2012-04-10 14:06:34 -04:00
*/
// --------------------------------------------------------------------------
/**
2012-12-18 16:19:52 -05:00
* parent for database manipulation subclasses
2012-04-20 13:17:39 -04:00
*
* @package Query
* @subpackage Query
2012-04-10 14:06:34 -04:00
*/
2012-12-18 16:19:52 -05:00
interface iDB_SQL {
2012-04-10 14:06:34 -04:00
/**
* Get database specific sql for limit clause
*
* @abstract
* @param string $sql
* @param int $limit
2012-04-10 14:06:34 -04:00
* @param int $offset
* @return string
*/
2012-12-18 16:19:52 -05:00
public function limit($sql, $limit, $offset=FALSE);
2014-02-04 20:59:30 -05:00
/**
* Modify the query to get the query plan
*
* @param string $sql
* @return string
*/
public function explain($sql);
2012-04-10 14:06:34 -04:00
/**
* Get the sql for random ordering
*
* @abstract
* @return string
*/
2012-12-18 16:19:52 -05:00
public function random();
2012-04-10 14:06:34 -04:00
/**
* Returns sql to list other databases
*
* @return string
*/
2012-12-18 16:19:52 -05:00
public function db_list();
2012-04-10 14:06:34 -04:00
/**
* Returns sql to list tables
*
* @return string
*/
2012-12-18 16:19:52 -05:00
public function table_list();
2012-04-10 14:06:34 -04:00
/**
* Returns sql to list system tables
*
* @return string
*/
2012-12-18 16:19:52 -05:00
public function system_table_list();
2012-04-10 14:06:34 -04:00
/**
* Returns sql to list views
*
* @return string
*/
2012-12-18 16:19:52 -05:00
public function view_list();
2012-04-10 14:06:34 -04:00
/**
* Returns sql to list triggers
*
* @return string
*/
2012-12-18 16:19:52 -05:00
public function trigger_list();
2012-04-10 14:06:34 -04:00
/**
* Return sql to list functions
*
* @return NULL
2012-04-10 14:06:34 -04:00
*/
2012-12-18 16:19:52 -05:00
public function function_list();
2012-04-10 14:06:34 -04:00
/**
* Return sql to list stored procedures
*
* @return string
*/
2012-12-18 16:19:52 -05:00
public function procedure_list();
2012-04-10 14:06:34 -04:00
/**
* Return sql to list sequences
*
* @return string
*/
2012-12-18 16:19:52 -05:00
public function sequence_list();
/**
* Return sql to list database field types
*
2012-05-08 08:31:57 -04:00
* @return mixed
*/
2012-12-18 16:19:52 -05:00
public function type_list();
/**
* Get information about the columns in the
* specified table
*
* @param string
* @return string
*/
2012-12-18 16:19:52 -05:00
public function column_list($table);
2012-04-10 14:06:34 -04:00
}
2014-02-04 20:59:30 -05:00
// End of db_sql.php