File: tests/expected/parser/issue33p.serialized

Recommend this page to a friend!
  Classes of Michael Cummings  >  PHP SQL Parser Class  >  tests/expected/parser/issue33p.serialized  >  Download  
File: tests/expected/parser/issue33p.serialized
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP SQL Parser Class
Parse SQL to extract the SQL query structure
Author: By
Last change:
Date: 2 years ago
Size: 3,534 bytes
 

 

Contents

Class file image Download
a:2:{s:6:"CREATE";a:4:{s:9:"expr_type";s:5:"table";s:10:"not-exists";b:0;s:9:"base_expr";s:5:"TABLE";s:8:"sub_tree";a:1:{i:0;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:5:"TABLE";}}}s:5:"TABLE";a:6:{s:9:"base_expr";s:2:"ti";s:4:"name";s:2:"ti";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:2:"ti";}}s:10:"create-def";a:3:{s:9:"expr_type";s:18:"bracket_expression";s:9:"base_expr";s:46:" (id INT, amount DECIMAL(7,2), purchased DATE)";s:8:"sub_tree";a:3:{i:0;a:3:{s:9:"expr_type";s:10:"column-def";s:9:"base_expr";s:6:"id INT";s:8:"sub_tree";a:2:{i:0;a:3:{s:9:"expr_type";s:6:"colref";s:9:"base_expr";s:2:"id";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:2:"id";}}}i:1;a:7:{s:9:"expr_type";s:11:"column-type";s:9:"base_expr";s:3:"INT";s:8:"sub_tree";a:1:{i:0;a:5:{s:9:"expr_type";s:9:"data-type";s:9:"base_expr";s:3:"INT";s:8:"unsigned";b:0;s:8:"zerofill";b:0;s:6:"length";b:0;}}s:6:"unique";b:0;s:8:"nullable";b:1;s:8:"auto_inc";b:0;s:7:"primary";b:0;}}}i:1;a:3:{s:9:"expr_type";s:10:"column-def";s:9:"base_expr";s:19:"amount DECIMAL(7,2)";s:8:"sub_tree";a:2:{i:0;a:3:{s:9:"expr_type";s:6:"colref";s:9:"base_expr";s:6:"amount";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:6:"amount";}}}i:1;a:7:{s:9:"expr_type";s:11:"column-type";s:9:"base_expr";s:12:"DECIMAL(7,2)";s:8:"sub_tree";a:2:{i:0;a:6:{s:9:"expr_type";s:9:"data-type";s:9:"base_expr";s:7:"DECIMAL";s:8:"unsigned";b:0;s:8:"zerofill";b:0;s:6:"length";s:1:"7";s:8:"decimals";s:1:"2";}i:1;a:3:{s:9:"expr_type";s:18:"bracket_expression";s:9:"base_expr";s:5:"(7,2)";s:8:"sub_tree";a:2:{i:0;a:3:{s:9:"expr_type";s:5:"const";s:9:"base_expr";s:1:"7";s:8:"sub_tree";b:0;}i:1;a:3:{s:9:"expr_type";s:5:"const";s:9:"base_expr";s:1:"2";s:8:"sub_tree";b:0;}}}}s:6:"unique";b:0;s:8:"nullable";b:1;s:8:"auto_inc";b:0;s:7:"primary";b:0;}}}i:2;a:3:{s:9:"expr_type";s:10:"column-def";s:9:"base_expr";s:14:"purchased DATE";s:8:"sub_tree";a:2:{i:0;a:3:{s:9:"expr_type";s:6:"colref";s:9:"base_expr";s:9:"purchased";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:9:"purchased";}}}i:1;a:7:{s:9:"expr_type";s:11:"column-type";s:9:"base_expr";s:4:"DATE";s:8:"sub_tree";a:1:{i:0;a:2:{s:9:"expr_type";s:9:"data-type";s:9:"base_expr";s:4:"DATE";}}s:6:"unique";b:0;s:8:"nullable";b:1;s:8:"auto_inc";b:0;s:7:"primary";b:0;}}}}}s:7:"options";a:1:{i:0;a:4:{s:9:"expr_type";s:10:"expression";s:9:"base_expr";s:13:"ENGINE=INNODB";s:5:"delim";s:1:" ";s:8:"sub_tree";a:3:{i:0;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:6:"ENGINE";}i:1;a:2:{s:9:"expr_type";s:8:"operator";s:9:"base_expr";s:1:"=";}i:2;a:2:{s:9:"expr_type";s:5:"const";s:9:"base_expr";s:6:"INNODB";}}}}s:17:"partition-options";a:1:{i:0;a:4:{s:9:"expr_type";s:9:"partition";s:9:"base_expr";s:35:"PARTITION BY RANGE(YEAR(purchased))";s:8:"sub_tree";a:3:{i:0;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:9:"PARTITION";}i:1;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:2:"BY";}i:2;a:3:{s:9:"expr_type";s:15:"partition-range";s:9:"base_expr";s:22:"RANGE(YEAR(purchased))";s:8:"sub_tree";a:2:{i:0;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:5:"RANGE";}i:1;a:3:{s:9:"expr_type";s:18:"bracket_expression";s:9:"base_expr";s:17:"(YEAR(purchased))";s:8:"sub_tree";a:1:{i:0;a:3:{s:9:"expr_type";s:8:"function";s:9:"base_expr";s:4:"YEAR";s:8:"sub_tree";a:1:{i:0;a:4:{s:9:"expr_type";s:6:"colref";s:9:"base_expr";s:9:"purchased";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:9:"purchased";}}s:8:"sub_tree";b:0;}}}}}}}}s:2:"by";s:5:"RANGE";}}}}

For more information send a message to info at phpclasses dot org.