PHP Classes

File: tests/expected/parser/issue136b.serialized

Recommend this page to a friend!
  Classes of Michael Cummings   PHP SQL Parser Class   tests/expected/parser/issue136b.serialized   Download  
File: tests/expected/parser/issue136b.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: 4,257 bytes
 

Contents

Class file image Download
a:3:{s:4:"WITH";a:2:{i:0;a:4:{s:9:"expr_type";s:18:"subquery-factoring";s:9:"base_expr";s:115:"myTableName AS ( select firstname, lastname from employee where lastname = 'test' )";s:8:"sub_tree";a:3:{i:0;a:5:{s:9:"expr_type";s:15:"temporary-table";s:4:"name";s:11:"myTableName";s:9:"base_expr";s:11:"myTableName";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:11:"myTableName";}}s:8:"position";i:5;}i:1;a:3:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:2:"AS";s:8:"position";i:17;}i:2;a:4:{s:9:"expr_type";s:18:"bracket_expression";s:9:"base_expr";s:100:"( select firstname, lastname from employee where lastname = 'test' )";s:8:"sub_tree";a:3:{s:6:"SELECT";a:2:{i:0;a:7:{s:9:"expr_type";s:6:"colref";s:5:"alias";b:0;s:9:"base_expr";s:9:"firstname";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:9:"firstname";}}s:8:"sub_tree";b:0;s:5:"delim";s:1:",";s:8:"position";i:45;}i:1;a:7:{s:9:"expr_type";s:6:"colref";s:5:"alias";b:0;s:9:"base_expr";s:8:"lastname";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:8:"lastname";}}s:8:"sub_tree";b:0;s:5:"delim";b:0;s:8:"position";i:56;}}s:4:"FROM";a:1:{i:0;a:11:{s:9:"expr_type";s:5:"table";s:5:"table";s:8:"employee";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:8:"employee";}}s:5:"alias";b:0;s:5:"hints";b:0;s:9:"join_type";s:4:"JOIN";s:8:"ref_type";b:0;s:10:"ref_clause";b:0;s:9:"base_expr";s:8:"employee";s:8:"sub_tree";b:0;s:8:"position";i:70;}}s:5:"WHERE";a:3:{i:0;a:5:{s:9:"expr_type";s:6:"colref";s:9:"base_expr";s:8:"lastname";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:8:"lastname";}}s:8:"sub_tree";b:0;s:8:"position";i:85;}i:1;a:4:{s:9:"expr_type";s:8:"operator";s:9:"base_expr";s:1:"=";s:8:"sub_tree";b:0;s:8:"position";i:94;}i:2;a:4:{s:9:"expr_type";s:5:"const";s:9:"base_expr";s:6:"'test'";s:8:"sub_tree";b:0;s:8:"position";i:96;}}}s:8:"position";i:20;}}s:8:"position";i:5;}i:1;a:4:{s:9:"expr_type";s:18:"subquery-factoring";s:9:"base_expr";s:58:"another_table AS ( select x,y FROM z )";s:8:"sub_tree";a:3:{i:0;a:5:{s:9:"expr_type";s:15:"temporary-table";s:4:"name";s:13:"another_table";s:9:"base_expr";s:13:"another_table";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:13:"another_table";}}s:8:"position";i:122;}i:1;a:3:{s:9:"expr_type";s:8:"reserved";s:9:"base_expr";s:2:"AS";s:8:"position";i:136;}i:2;a:4:{s:9:"expr_type";s:18:"bracket_expression";s:9:"base_expr";s:41:"( select x,y FROM z )";s:8:"sub_tree";a:2:{s:6:"SELECT";a:2:{i:0;a:7:{s:9:"expr_type";s:6:"colref";s:5:"alias";b:0;s:9:"base_expr";s:1:"x";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:1:"x";}}s:8:"sub_tree";b:0;s:5:"delim";s:1:",";s:8:"position";i:158;}i:1;a:7:{s:9:"expr_type";s:6:"colref";s:5:"alias";b:0;s:9:"base_expr";s:1:"y";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:1:"y";}}s:8:"sub_tree";b:0;s:5:"delim";b:0;s:8:"position";i:160;}}s:4:"FROM";a:1:{i:0;a:11:{s:9:"expr_type";s:5:"table";s:5:"table";s:1:"z";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:1:"z";}}s:5:"alias";b:0;s:5:"hints";b:0;s:9:"join_type";s:4:"JOIN";s:8:"ref_type";b:0;s:10:"ref_clause";b:0;s:9:"base_expr";s:1:"z";s:8:"sub_tree";b:0;s:8:"position";i:167;}}}s:8:"position";i:139;}}s:8:"position";i:122;}}s:6:"SELECT";a:1:{i:0;a:7:{s:9:"expr_type";s:6:"colref";s:5:"alias";b:0;s:9:"base_expr";s:9:"firstname";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:9:"firstname";}}s:8:"sub_tree";b:0;s:5:"delim";b:0;s:8:"position";i:204;}}s:4:"FROM";a:2:{i:0;a:11:{s:9:"expr_type";s:5:"table";s:5:"table";s:11:"myTableName";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:11:"myTableName";}}s:5:"alias";b:0;s:5:"hints";b:0;s:9:"join_type";s:4:"JOIN";s:8:"ref_type";b:0;s:10:"ref_clause";b:0;s:9:"base_expr";s:11:"myTableName";s:8:"sub_tree";b:0;s:8:"position";i:219;}i:1;a:11:{s:9:"expr_type";s:5:"table";s:5:"table";s:13:"another_table";s:9:"no_quotes";a:2:{s:5:"delim";b:0;s:5:"parts";a:1:{i:0;s:13:"another_table";}}s:5:"alias";b:0;s:5:"hints";b:0;s:9:"join_type";s:5:"CROSS";s:8:"ref_type";b:0;s:10:"ref_clause";b:0;s:9:"base_expr";s:13:"another_table";s:8:"sub_tree";b:0;s:8:"position";i:232;}}}