Changeset 227

Show
Ignore:
Timestamp:
12/30/07 00:16:22 (1 year ago)
Author:
chris
Message:

Add method to get a FlatSheaf?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lex/trunk/src/com/qwirx/lex/emdros/EmdrosDatabase.java

    r223 r227  
    1818import jemdros.BadMonadsException; 
    1919import jemdros.EmdrosEnv; 
     20import jemdros.FlatSheaf; 
    2021import jemdros.MatchedObject; 
    2122import jemdros.MonadSetElement; 
     
    107108                executeDirect(query); 
    108109                 
    109         if (! env.isSheaf())  
     110        if (!env.isSheaf())  
    110111        { 
    111112                        throw new DatabaseException("result is not a sheaf", query); 
     
    114115        return env.takeOverSheaf(); 
    115116        } 
     117 
     118    public FlatSheaf getFlatSheaf(String query)  
     119    throws DatabaseException  
     120    { 
     121        executeDirect(query); 
     122         
     123        if (!env.isFlatSheaf())  
     124        { 
     125            throw new DatabaseException("result is not a flat sheaf", query); 
     126        } 
     127         
     128        return env.takeOverFlatSheaf(); 
     129    } 
    116130 
    117131        public Table getTable(String query)