API > eden > mysql.php
View Source

class Eden_Mysql

Abstractly defines a layout of available methods to connect to and query a MySQL database. This class also lays out query building methods that auto renders a valid query the specific database will understand without actually needing to know the query language. Extending all SQL classes, comes coupled with loosely defined searching, collections and models.

Public Methods

public function alter($name = NULL)

Returns the alter query builder

Returns Eden_Sql_Alter

public function create($name = NULL)

Returns the create query builder

Returns Eden_Sql_Create

public function connect(array $options = array())

Connects to the database


  1. array the connection options

Returns this

public function subselect($parentQuery, $select = '*')

Returns the Subselect query builder

Returns Eden_Sql_Subselect

public function utility()

Returns the alter query builder

Returns Eden_Sql_Utility

public function getColumns($table, $filters = NULL)

Returns the columns and attributes given the table name


  1. the name of the table

Returns attay|false

public function getPrimaryKey($table)

Peturns the primary key name given the table


  1. string table

Returns string

public function getSchema()

Returns the whole enitre schema and rows of the current databse

Returns string

public function getTables($like = NULL)

Returns a listing of tables in the DB


  1. the like pattern

Returns attay|false

public function getTableSchema($table)

Returns the whole enitre schema and rows of the current table

Returns string

© 2012 Openovate Labs. All rights reserved.