PHP Classes

File: tests/expected/parser/issue33i.serialized

Recommend this page to a friend!
  Classes of Michael Cummings   PHP SQL Parser Class   tests/expected/parser/issue33i.serialized   Download  
File: tests/expected/parser/issue33i.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: 6 years ago
Size: 3,457 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:5:{s:9:"base_expr";s:6:"hohoho";s:4:"name";s:6:"hohoho";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:6:"hohoho";}}s:10:"create-def";a:3:{s:9:"expr_type";s:18:"bracket_expression";s:9:"base_expr";s:100:" (a varchar(1000), b integer, FOREIGN KEY haha (b) references xyz (id) match full on delete cascade)";s:8:"sub_tree";a:3:{i:0;a:3:{s:9:"expr_type";s:10:"column-def";s:9:"base_expr";s:15:"a varchar(1000)";s:8:"sub_tree";a:2:{i:0;a:3:{s:9:"expr_type";s:6:"colref";s:9:"base_expr";s:1:"a";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:1:"a";}}}i:1;a:7:{s:9:"expr_type";s:11:"column-type";s:9:"base_expr";s:13:"varchar(1000)";s:8:"sub_tree";a:2:{i:0;a:3:{s:9:"expr_type";s:9:"data-type";s:9:"base_expr";s:7:"varchar";s:6:"length";s:4:"1000";}i:1;a:3:{s:9:"expr_type";s:18:"bracket_expression";s:9:"base_expr";s:6:"(1000)";s:8:"sub_tree";a:1:{i:0;a:2:{s:9:"expr_type";s:5:"const";s:9:"base_expr";s:4:"1000";}}}}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:9:"b integer";s:8:"sub_tree";a:2:{i:0;a:3:{s:9:"expr_type";s:6:"colref";s:9:"base_expr";s:1:"b";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:1:"b";}}}i:1;a:7:{s:9:"expr_type";s:11:"column-type";s:9:"base_expr";s:7:"integer";s:8:"sub_tree";a:1:{i:0;a:5:{s:9:"expr_type";s:9:"data-type";s:9:"base_expr";s:7:"integer";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:2;a:3:{s:9:"expr_type";s:11:"foreign-key";s:9:"base_expr";s:69:"FOREIGN KEY haha (b) references xyz (id) match full on delete cascade";s:8:"sub_tree";a:5:{i:0;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:7:"FOREIGN";}i:1;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:3:"KEY";}i:2;a:2:{s:9:"expr_type";s:5:"const";s:9:"base_expr";s:4:"haha";}i:3;a:3:{s:9:"expr_type";s:11:"column-list";s:9:"base_expr";s:3:"(b)";s:8:"sub_tree";a:1:{i:0;a:6:{s:9:"expr_type";s:12:"index-column";s:9:"base_expr";s:1:"b";s:4:"name";s:1:"b";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:1:"b";}}s:6:"length";b:0;s:3:"dir";b:0;}}}i:4;a:5:{s:9:"expr_type";s:11:"foreign-ref";s:9:"base_expr";s:48:"references xyz (id) match full on delete cascade";s:8:"sub_tree";a:8:{i:0;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:10:"references";}i:1;a:4:{s:9:"expr_type";s:5:"table";s:5:"table";s:3:"xyz";s:9:"base_expr";s:3:"xyz";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:3:"xyz";}}}i:2;a:3:{s:9:"expr_type";s:11:"column-list";s:9:"base_expr";s:4:"(id)";s:8:"sub_tree";a:1:{i:0;a:6:{s:9:"expr_type";s:12:"index-column";s:9:"base_expr";s:2:"id";s:4:"name";s:2:"id";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:2:"id";}}s:6:"length";b:0;s:3:"dir";b:0;}}}i:3;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:5:"match";}i:4;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:4:"full";}i:5;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:2:"on";}i:6;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:6:"delete";}i:7;a:2:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:7:"cascade";}}s:5:"match";s:4:"FULL";s:9:"on_delete";s:7:"CASCADE";}}}}}s:7:"options";b:0;}}