Package org.apache.derby.iapi.types

Examples of org.apache.derby.iapi.types.SQLChar


    List          ddlList = newSList();
    DataValueDescriptor    providerIDOrderable;
    TabInfoImpl          ti = getNonCoreTI(SYSDEPENDS_CATALOG_NUM);

    /* Use providerIDOrderable in both start and stop positions for scan */
    providerIDOrderable = new SQLChar(providerID);

    /* Set up the start/stop position for the scan */
    ExecIndexRow keyRow = exFactory.getIndexableRow(1);
    keyRow.setColumn(1, providerIDOrderable);

View Full Code Here


     * and stop position for scan.
     */
    aliasNameOrderable = new SQLVarchar(aliasName);
    char[] charArray = new char[1];
    charArray[0] = nameSpace;
    nameSpaceOrderable = new SQLChar(new String(charArray));

    /* Set up the start/stop position for the scan */
    ExecIndexRow keyRow = exFactory.getIndexableRow(3);
    keyRow.setColumn(1, new SQLChar(schemaId));
    keyRow.setColumn(2, aliasNameOrderable);
    keyRow.setColumn(3, nameSpaceOrderable);

    return (AliasDescriptor)
          getDescriptorViaIndex(
View Full Code Here

    /* Set up the start/stop position for the scan */
        ExecIndexRow keyRow1 = (ExecIndexRow) exFactory.getIndexableRow(3);
    keyRow1.setColumn(1, getIDValueAsCHAR(ad.getSchemaUUID()));
    keyRow1.setColumn(2, new SQLVarchar(ad.getDescriptorName()));
    keyRow1.setColumn(3, new SQLChar(new String(charArray)));

    ti.deleteRow( tc, keyRow1, SYSALIASESRowFactory.SYSALIASES_INDEX1_ID );

  }
View Full Code Here

    /* Use tableNameOrderable and schemaIdOrderable in both start
     * and stop position for scan.
     */
    tableNameOrderable = new SQLVarchar(tableName);
    schemaIDOrderable = new SQLChar(schemaUUID);

    /* Set up the start/stop position for the scan */
    ExecIndexRow keyRow = exFactory.getIndexableRow(2);
    keyRow.setColumn(1, tableNameOrderable);
    keyRow.setColumn(2, schemaIDOrderable);

    heapCC = tc.openConglomerate(
                ti.getHeapConglomerate(), false, 0,
                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_REPEATABLE_READ);

    ExecRow indexTemplateRow = rf.buildEmptyIndexRow( SYSTABLESRowFactory.SYSTABLES_INDEX1_ID, heapCC.newRowLocationTemplate() );

    /* Scan the index and go to the data pages for qualifying rows to
     * build the column descriptor.
     */
    scanController = tc.openScan(
        ti.getIndexConglomerate(SYSTABLESRowFactory.SYSTABLES_INDEX1_ID)// conglomerate to open
        false, // don't hold open across commit
        0,
                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_REPEATABLE_READ,
        (FormatableBitSet) null,         // all fields as objects
        keyRow.getRowArray(),   // start position - first row
        ScanController.GE,      // startSearchOperation
        (ScanQualifier[][]) null, //scanQualifier,
        keyRow.getRowArray(),   // stop position - through last row
        ScanController.GT);     // stopSearchOperation

        /* OK to fetch into the template row,
         * since we won't be doing a next.
         */
    if (scanController.fetchNext(indexTemplateRow.getRowArray()))
    {
      RowLocation  baseRowLocation;


      baseRowLocation = (RowLocationindexTemplateRow.getColumn(
                        indexTemplateRow.nColumns());
 
      /* 1st column is TABLEID (UUID - char(36)) */
      row.setColumn(SYSTABLESRowFactory.SYSTABLES_TABLEID, new SQLChar());
      FormatableBitSet bi = new FormatableBitSet(1);
      bi.set(0);
      boolean base_row_exists =
                heapCC.fetch(
                    baseRowLocation, row.getRowArray(), (FormatableBitSet) null);
View Full Code Here

   *
   */
  private static SQLChar getIDValueAsCHAR(UUID uuid)
  {
    String  uuidString = uuid.toString();
    return   new SQLChar(uuidString);
  }
View Full Code Here

    TabInfoImpl ti = coreInfo[SYSCOLUMNS_CORE_NUM];
    ExecIndexRow keyRow = null;

    keyRow = (ExecIndexRow)exFactory.getIndexableRow(2);
    keyRow.setColumn(1, getIDValueAsCHAR(tableUUID));
      keyRow.setColumn(2, new SQLChar(columnName));
   
    SYSCOLUMNSRowFactory  rf = (SYSCOLUMNSRowFactory) ti.getCatalogRowFactory();
    ExecRow row = rf.makeEmptyRow();

    boolean[] bArray = new boolean[2];
View Full Code Here

    ExecRow row;
    UUID tableUUID = td.getUUID();

    keyRow = (ExecIndexRow)exFactory.getIndexableRow(2);
    keyRow.setColumn(1, getIDValueAsCHAR(tableUUID));
      keyRow.setColumn(2, new SQLChar(columnName));
    return ti.getRowLocation(tc, keyRow,
                 SYSCOLUMNSRowFactory.SYSCOLUMNS_INDEX1_ID);
  }
View Full Code Here

    /* Build the row to insert */
    row = getExecutionFactory().getValueRow(SYSTRIGGERS_COLUMN_COUNT);

    /* 1st column is TRIGGERID */
    row.setColumn(1, new SQLChar((uuid == null) ? null : uuid.toString()));

    /* 2nd column is TRIGGERNAME */
    row.setColumn(2, new SQLVarchar(name));

    /* 3rd column is SCHEMAID */
    row.setColumn(3, new SQLChar((suuid == null) ? null : suuid.toString()));

    /* 4th column is CREATIONTIMESTAMP */
    row.setColumn(4, dvf.getDataValue(createTime));

    /* 5th column is EVENT */
    row.setColumn(5, new SQLChar(event));

    /* 6th column is FIRINGTIME */
    row.setColumn(6, new SQLChar(time));

    /* 7th column is TYPE */
    row.setColumn(7, new SQLChar(type));

    /* 8th column is STATE */
    row.setColumn(8, new SQLChar(enabled));

    /* 9th column is TABLEID */
    row.setColumn(9, new SQLChar((tuuid == null) ? null : tuuid.toString()));

    /* 10th column is WHENSTMTID */
    row.setColumn(10, new SQLChar((whenSPSID == null) ? null : whenSPSID.toString()));

    /* 11th column is ACTIONSTMTID */
    row.setColumn(11, new SQLChar((actionSPSID == null) ? null : actionSPSID.toString()));

    /* 12th column is REFERENCEDCOLUMNS
     *  (user type org.apache.derby.catalog.ReferencedColumns)
     */
    row.setColumn(12, dvf.getDataValue(rcd));
View Full Code Here

    /* Build the row to insert */
    ExecRow row = getExecutionFactory().getValueRow(SYSALIASES_COLUMN_COUNT);

    /* 1st column is ALIASID (UUID - char(36)) */
    row.setColumn(SYSALIASES_ALIASID, new SQLChar(aliasID));

    /* 2nd column is ALIAS (varchar(128))) */
    row.setColumn(SYSALIASES_ALIAS, new SQLVarchar(aliasName));
    //    System.out.println(" added row-- " + aliasName);

    /* 3rd column is SCHEMAID (UUID - char(36)) */
    row.setColumn(SYSALIASES_SCHEMAID, new SQLChar(schemaID));

    /* 4th column is JAVACLASSNAME (longvarchar) */
    row.setColumn(SYSALIASES_JAVACLASSNAME, dvf.getLongvarcharDataValue(javaClassName));

    /* 5th column is ALIASTYPE (char(1)) */
    row.setColumn(SYSALIASES_ALIASTYPE, new SQLChar(sAliasType));

    /* 6th column is NAMESPACE (char(1)) */
    String sNameSpace = new String(new char[] { cNameSpace });

    row.setColumn
      (SYSALIASES_NAMESPACE, new SQLChar(sNameSpace));


    /* 7th column is SYSTEMALIAS (boolean) */
    row.setColumn
      (SYSALIASES_SYSTEMALIAS, dvf.getDataValue(systemAlias));
View Full Code Here

    /* Build the row to insert  */
    row = getExecutionFactory().getValueRow(SYSTABLES_COLUMN_COUNT);

    /* 1st column is TABLEID (UUID - char(36)) */
    row.setColumn(SYSTABLES_TABLEID, new SQLChar(tableID));

    /* 2nd column is NAME (varchar(30)) */
    row.setColumn(SYSTABLES_TABLENAME, new SQLVarchar(tableName));

    /* 3rd column is TABLETYPE (char(1)) */
    row.setColumn(SYSTABLES_TABLETYPE, new SQLChar(tabSType));

    /* 4th column is SCHEMAID (UUID - char(36)) */
    row.setColumn(SYSTABLES_SCHEMAID, new SQLChar(schemaID));

    /* 5th column is LOCKGRANULARITY (char(1)) */
    row.setColumn(SYSTABLES_LOCKGRANULARITY, new SQLChar(lockGranularity));

    return row;
  }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.types.SQLChar

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.