PHP Classes

File: tests/expected/parser/issue33o.serialized

Recommend this page to a friend!
  Classes of Michael Cummings   PHP SQL Parser Class   tests/expected/parser/issue33o.serialized   Download  
File: tests/expected/parser/issue33o.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: 5 years ago
Size: 5,371 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:44:" (id INT, amount DECIMAL(7,2), tr_date 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:12:"tr_date DATE";s:8:"sub_tree";a:2:{i:0;a:3:{s:9:"expr_type";s:6:"colref";s:9:"base_expr";s:7:"tr_date";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:7:"tr_date";}}}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:2:{i:0;a:5:{s:9:"expr_type";s:9:"partition";s:9:"base_expr";s:70:"PARTITION BY LINEAR KEY ALGORITHM=2 (tr_date) PARTITIONS 6";s:8:"sub_tree";a:5:{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:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:6:"LINEAR";}i:3;a:5:{s:9:"expr_type";s:13:"partition-key";s:9:"base_expr";s:25:"KEY ALGORITHM=2 (tr_date)";s:6:"linear";b:1;s:8:"sub_tree";a:3:{i:0;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:3:"KEY";}i:1;a:3:{s:9:"expr_type";s:23:"partition-key-algorithm";s:9:"base_expr";s:11:"ALGORITHM=2";s:8:"sub_tree";a:3:{i:0;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:9:"ALGORITHM";}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:1:"2";}}}i:2;a:3:{s:9:"expr_type";s:11:"column-list";s:9:"base_expr";s:9:"(tr_date)";s:8:"sub_tree";a:1:{i:0;a:3:{s:9:"expr_type";s:6:"colref";s:9:"base_expr";s:7:"tr_date";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:7:"tr_date";}}}}}}s:9:"algorithm";s:1:"2";}i:4;a:3:{s:9:"expr_type";s:15:"partition-count";s:9:"base_expr";s:12:"PARTITIONS 6";s:8:"sub_tree";a:2:{i:0;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:10:"PARTITIONS";}i:1;a:2:{s:9:"expr_type";s:5:"const";s:9:"base_expr";s:1:"6";}}}}s:2:"by";s:10:"LINEAR KEY";s:5:"count";s:1:"6";}i:1;a:5:{s:9:"expr_type";s:13:"sub-partition";s:9:"base_expr";s:72:"SUBPARTITION BY LINEAR HASH (MONTH(tr_date)) SUBPARTITIONS 2";s:8:"sub_tree";a:5:{i:0;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:12:"SUBPARTITION";}i:1;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:2:"BY";}i:2;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:6:"LINEAR";}i:3;a:4:{s:9:"expr_type";s:18:"sub-partition-hash";s:9:"base_expr";s:21:"HASH (MONTH(tr_date))";s:6:"linear";b:1;s:8:"sub_tree";a:2:{i:0;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:4:"HASH";}i:1;a:3:{s:9:"expr_type";s:18:"bracket_expression";s:9:"base_expr";s:16:"(MONTH(tr_date))";s:8:"sub_tree";a:1:{i:0;a:3:{s:9:"expr_type";s:8:"function";s:9:"base_expr";s:5:"MONTH";s:8:"sub_tree";a:1:{i:0;a:4:{s:9:"expr_type";s:6:"colref";s:9:"base_expr";s:7:"tr_date";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:7:"tr_date";}}s:8:"sub_tree";b:0;}}}}}}}i:4;a:3:{s:9:"expr_type";s:19:"sub-partition-count";s:9:"base_expr";s:15:"SUBPARTITIONS 2";s:8:"sub_tree";a:2:{i:0;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:13:"SUBPARTITIONS";}i:1;a:2:{s:9:"expr_type";s:5:"const";s:9:"base_expr";s:1:"2";}}}}s:2:"by";s:11:"LINEAR HASH";s:5:"count";s:1:"2";}}}}