smacs.find
Class DatabaseList
java.lang.Object
smacs.find.DatabaseList
- Direct Known Subclasses:
- TableList
- public class DatabaseList
- extends Object
Scan node tree for items looking like database/schema references.
The SEARCH_PATH is an idiom in postgresql to declare the database
names that a script shall recognize. We suspect the path to be
declared in a view scriptlet to give an order to the database
names in the script. The internal compiler parts will eventually
use numeric index numbers to access database names. If there is
no explicit search_path then we order the databases in the order
that they occur textually in the view scriptlet.
- Author:
- Copyright (C) 2004, Guido Draheim. All rights reserved. Part of SMACS project.
log
protected static final Logger log
DatabaseList
public DatabaseList()
DatabaseList
public DatabaseList(SimpleNode tree)
walkSetSearchPathArgumentList
public int walkSetSearchPathArgumentList(SimpleNode tree)
- here, scan the scriptlet tree for an explicit SET SEARCH_PATH
walkTableReferencePrefixValue
public int walkTableReferencePrefixValue(SimpleNode tree)
eachSqlTableReferencePrefixValue
public boolean eachSqlTableReferencePrefixValue(String database)
eachSqlSetSearchPathArgumentList
public boolean eachSqlSetSearchPathArgumentList(Node node)
eachSqlSetSearchPathArgument
public boolean eachSqlSetSearchPathArgument(String database)
eachSqlDatabaseReference
public boolean eachSqlDatabaseReference(String database)
addDatabaseReference
public void addDatabaseReference(String database)
printDatabaseList
public int printDatabaseList(PrintStream stream)
addDatabaseReferencesIn
public int addDatabaseReferencesIn(SimpleNode tree)
clear
public void clear()
isEmpty
public boolean isEmpty()
toString
public String toString()
elements
public Enumeration elements()
size
public int size()
main
public static void main(String[] args)
- self test program