34 lines
		
	
	
		
			502 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			502 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef __TABLEREF_H__
 | |
| #define __TABLEREF_H__
 | |
| 
 | |
| class SelectStatement;
 | |
| class JoinStatement;
 | |
| 
 | |
| /**
 | |
|  * TableRef
 | |
|  * Holds reference to tables. Can be either table names or a select statement.
 | |
|  */
 | |
| typedef enum {
 | |
| 	kTableName,
 | |
| 	kTableSelect,
 | |
| 	kTableJoin,
 | |
| 	kTableCrossProduct
 | |
| } TableRefType;
 | |
| 
 | |
| typedef struct TableRef TableRef;
 | |
| 
 | |
| struct TableRef {
 | |
| 	TableRef(TableRefType type) : type(type) {}
 | |
| 
 | |
| 	TableRefType type;
 | |
| 
 | |
| 	char* name;
 | |
| 	SelectStatement* select;
 | |
| 	JoinStatement* join;
 | |
| 	List<TableRef*>* list;
 | |
| };
 | |
| 
 | |
| 
 | |
| 
 | |
| #endif
 | 
