Package com.caucho.db.table

Examples of com.caucho.db.table.Table


    if (tableName == null) {
      if ("resin_oid".equals(columnName))
        return new OidExpr(fromItems[0].getTable(), 0);

      for (int i = 0; i < fromItems.length; i++) {
        Table table = fromItems[i].getTable();

        int columnIndex = table.getColumnIndex(columnName);

        if (columnIndex >= 0) {
          Column column = table.getColumn(columnName);

          return new IdExpr(fromItems[i], column);
        }
      }

      Expr expr = bindParent(tableName, columnName);
      if (expr != null) {
        return expr;
      }

      throw new SQLException(L.l("`{0}' is an unknown column.", columnName));
    }
    else {
      for (int i = 0; i < fromItems.length; i++) {
        if (tableName.equals(fromItems[i].getName())) {
          Table table = fromItems[i].getTable();

          if ("resin_oid".equals(columnName))
            return new OidExpr(table, i);

          int columnIndex = table.getColumnIndex(columnName);

          if (columnIndex < 0) {
            Expr expr = bindParent(tableName, columnName);
            if (expr != null)
              return expr;

            throw new SQLException(L.l("`{0}' is an unknown column in \n  {1}.",
                                       columnName, _sql));
          }

          Column column = table.getColumn(columnName);

          return new IdExpr(fromItems[i], column);
        }
      }
View Full Code Here


    throws SQLException
  {
    ArrayList<Expr> exprs = new ArrayList<Expr>();

    for (int i = 0; i < fromItems.length; i++) {
      Table table = fromItems[i].getTable();
      Column []columns = table.getColumns();

      if (_table != null && ! fromItems[i].getName().equals(_table))
  continue;

      for (int j = 0; j < columns.length; j++) {
View Full Code Here

TOP

Related Classes of com.caucho.db.table.Table

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.