/** * Retruns the specified user-defined table or view visible within the context of the specified * Session, or any system table of the given name. It excludes any temp tables created in * different Sessions. Throws if the table does not exist in the context. */ public Table getTable(Session session, String name) throws HsqlException { Table t = findUserTable(session, name); if (t == null) { t = dInfo.getSystemTable(session, name); } if (t == null) { throw Trace.error(Trace.TABLE_NOT_FOUND, name); } return t; }
/** * Retrieves the specified user-defined table or view visible within the context of the specified * Session, or any system table of the given name. This excludes any temp tables created in * different Sessions. * * @param name of the table or view to retrieve * @param session the Session within which to search for user tables * @return the user table or view, or system table * @throws SQLException if there is no such table or view */ Table getTable(String name, Session session) throws SQLException { Table t = findUserTable(name, session); if (t == null) { t = dInfo.getSystemTable(name, session); } if (t == null) { throw Trace.error(Trace.TABLE_NOT_FOUND, name); } return t; }