SMACS

smacs.find
Class DatabaseList

java.lang.Object
  extended bysmacs.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.

Field Summary
protected static Logger log
           
 
Constructor Summary
DatabaseList()
           
DatabaseList(SimpleNode tree)
           
 
Method Summary
 void addDatabaseReference(String database)
           
 int addDatabaseReferencesIn(SimpleNode tree)
           
 void clear()
           
 boolean eachSqlDatabaseReference(String database)
           
 boolean eachSqlSetSearchPathArgument(String database)
           
 boolean eachSqlSetSearchPathArgumentList(Node node)
           
 boolean eachSqlTableReferencePrefixValue(String database)
           
 Enumeration elements()
           
 boolean isEmpty()
           
static void main(String[] args)
          self test program
 int printDatabaseList(PrintStream stream)
           
 int size()
           
 String toString()
           
 int walkSetSearchPathArgumentList(SimpleNode tree)
          here, scan the scriptlet tree for an explicit SET SEARCH_PATH
 int walkTableReferencePrefixValue(SimpleNode tree)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final Logger log
Constructor Detail

DatabaseList

public DatabaseList()

DatabaseList

public DatabaseList(SimpleNode tree)
Method Detail

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


SMACS