[ Index ]

PHP Cross Reference of BackPress

title

Body

[close]

/includes/ -> class.bp-sql-schema-parser.php (summary)

(no description)

File Size: 620 lines (24 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BP_SQL_Schema_Parser:: (6 methods):
  get_column_definition()
  get_index_definition()
  describe_table()
  _flatten_array()
  parse()
  delta()


Class: BP_SQL_Schema_Parser  - X-Ref

Parses SQL schema statements for comparison to real table structures

get_column_definition( $column_data )   X-Ref
Builds a column definition as used in CREATE TABLE statements from
an array such as those returned by DESCRIBE `foo` statements


get_index_definition( $index_data )   X-Ref
Builds an index definition as used in CREATE TABLE statements from
an array similar to those returned by SHOW INDEX FROM `foo` statements


describe_table( $query )   X-Ref
Returns a table structure from a raw sql query of the form "CREATE TABLE foo" etc.
The resulting array contains the original query, the columns as would be returned by DESCRIBE `foo`
and the indices as would be returned by SHOW INDEX FROM `foo` on a real table


_flatten_array( $array, $cut_branch = 0, $keep_child_array_keys = true )   X-Ref
Helper function to flatten arrays


parse( $sql )   X-Ref
Splits grouped SQL statements into queries within a highly structured array
Only supports CREATE TABLE, INSERT and UPDATE


delta( $db_object, $queries, $ignore = false, $execute = true )   X-Ref
Evaluates the difference between a given set of SQL queries and real database structure




Generated: Sat Nov 23 01:00:54 2024 Cross-referenced by PHPXref 0.7.1