Examples of FormatableProperties


Examples of org.apache.derby.iapi.services.io.FormatableProperties

                                                    null,
                                                    getContextManager());

    //we would like to use references index & table scan instead of
    //what optimizer says for the dependent table scan.
    Properties targetProperties = new FormatableProperties();
    targetProperties.put("index", "null");
    ((FromBaseTable) fromTable).setTableProperties(targetProperties);

        fromList.addFromTable(fromTable);
        resultSet = (SelectNode) nodeFactory.getNode(
                                                     C_NodeTypes.SELECT_NODE,
View Full Code Here

Examples of org.apache.derby.iapi.services.io.FormatableProperties

                                                    getContextManager());


    //we would like to use references index & table scan instead of
    //what optimizer says for the dependent table scan.
    Properties targetProperties = new FormatableProperties();
    targetProperties.put("index", "null");
    ((FromBaseTable) fromTable).setTableProperties(targetProperties);

        fromList.addFromTable(fromTable);

    resultSet = (SelectNode) nodeFactory.getNode(
View Full Code Here

Examples of org.apache.derby.iapi.services.io.FormatableProperties

      optimizerEstimatedCost
      );
    this.hashtableSize = hashtableSize;
    this.hashKeyColumns = hashKeyColumns;
    this.nextQualifiers = nextQualifiers;
    this.scanProperties = new FormatableProperties();
    if (scanProperties != null)
    {
      for (Enumeration e = scanProperties.keys(); e.hasMoreElements(); )
      {
        String key = (String)e.nextElement();
View Full Code Here

Examples of org.apache.derby.iapi.services.io.FormatableProperties

    this.tableName = tableName;
    this.userSuppliedOptimizerOverrides = userSuppliedOptimizerOverrides;
    this.indexName = indexName;
    this.isConstraint = isConstraint;
    this.qualifiers = qualifiers;
    this.scanProperties = new FormatableProperties();
    for (Enumeration e = scanProperties.keys(); e.hasMoreElements(); )
    {
      String key = (String)e.nextElement();
      this.scanProperties.put(key, scanProperties.get(key));
    }
View Full Code Here

Examples of org.apache.derby.iapi.services.io.FormatableProperties

    this.rowsInput = rowsInput;
    this.rowsReturned = rowsReturned;
    this.eliminateDuplicates = eliminateDuplicates;
    this.inSortedOrder = inSortedOrder;
    this.childResultSetStatistics = childResultSetStatistics;
    this.sortProperties = new FormatableProperties();
    for (Enumeration e = sortProperties.keys(); e.hasMoreElements(); )
    {
      String key = (String)e.nextElement();
      this.sortProperties.put(key, sortProperties.get(key));
    }
View Full Code Here

Examples of org.apache.derby.iapi.services.io.FormatableProperties

* only eg impl/load/import.java specifies property insertMode=replace/bulkInsert
* in the insert statement. This same property will not be acceptable from an
* insert statement from a user sql.
*/
  final public Properties propertyList(boolean propertiesUseAllowed) throws ParseException, StandardException {
        Properties properties = new FormatableProperties();
        StringTokenizer commaSeparatedProperties;
        StringTokenizer equalOperatorSeparatedProperty;
    jj_consume_token(DERBYDASHPROPERTIES);
                //first use StringTokenizer to get tokens which are delimited by ,s
                commaSeparatedProperties = new StringTokenizer(getToken(1).image,",");
                while (commaSeparatedProperties.hasMoreTokens()) {
                        //Now verify that tokens delimited by ,s follow propertyName=value pattern
                        String currentProperty = commaSeparatedProperties.nextToken();
                        equalOperatorSeparatedProperty = new StringTokenizer(currentProperty,"=", true);
                        if (equalOperatorSeparatedProperty.countTokens() != 3)
                                {if (true) throw StandardException.newException(SQLState.PROPERTY_SYNTAX_INVALID);}
                        else {
                                String key = equalOperatorSeparatedProperty.nextToken().trim();
                                if (!equalOperatorSeparatedProperty.nextToken().equals("="))
                                        {if (true) throw StandardException.newException(SQLState.PROPERTY_SYNTAX_INVALID);}
                                String value = equalOperatorSeparatedProperty.nextToken().trim();
                                verifyImageLength(value);
                                /* Trim off the leading and trailing ', and compress all '' to ' */
                                if (value.startsWith("'") && value.endsWith("'"))
                                        value = compressQuotes(value.substring(1, value.length() - 1), SINGLEQUOTES);
                                /* Trim off the leading and trailing ", and compress all "" to " */
                                else if (value.startsWith("\"") && value.endsWith("\""))
                                        value = compressQuotes(value.substring(1, value.length() - 1), DOUBLEQUOTES);
                                else
                                        value = value.toUpperCase();
                                // Do not allow user to specify multiple values for the same key
                                if (properties.put(key, value) != null)
                                {
                                        {if (true) throw StandardException.newException(SQLState.LANG_DUPLICATE_PROPERTY, key);}
                                }
                }
        }
View Full Code Here

Examples of org.apache.derby.iapi.services.io.FormatableProperties

* only eg impl/load/import.java specifies property insertMode=replace/bulkInsert
* in the insert statement. This same property will not be acceptable from an
* insert statement from a user sql.
*/
  final public Properties propertyList(boolean propertiesUseAllowed) throws ParseException, StandardException {
        Properties properties = new FormatableProperties();
        StringTokenizer commaSeparatedProperties;
        StringTokenizer equalOperatorSeparatedProperty;
    jj_consume_token(DERBYDASHPROPERTIES);
                //first use StringTokenizer to get tokens which are delimited by ,s
                commaSeparatedProperties = new StringTokenizer(getToken(1).image,",");
                while (commaSeparatedProperties.hasMoreTokens()) {
                        //Now verify that tokens delimited by ,s follow propertyName=value pattern
                        String currentProperty = commaSeparatedProperties.nextToken();
                        equalOperatorSeparatedProperty = new StringTokenizer(currentProperty,"=", true);
                        if (equalOperatorSeparatedProperty.countTokens() != 3)
                                {if (true) throw StandardException.newException(SQLState.PROPERTY_SYNTAX_INVALID);}
                        else {
                                String key = equalOperatorSeparatedProperty.nextToken().trim();
                                if (!equalOperatorSeparatedProperty.nextToken().equals("="))
                                        {if (true) throw StandardException.newException(SQLState.PROPERTY_SYNTAX_INVALID);}
                                String value = equalOperatorSeparatedProperty.nextToken().trim();
                                verifyImageLength(value);
                                /* Trim off the leading and trailing ', and compress all '' to ' */
                                if (value.startsWith("'") && value.endsWith("'"))
                                        value = compressQuotes(value.substring(1, value.length() - 1), SINGLEQUOTES);
                                /* Trim off the leading and trailing ", and compress all "" to " */
                                else if (value.startsWith("\"") && value.endsWith("\""))
                                        value = compressQuotes(value.substring(1, value.length() - 1), DOUBLEQUOTES);
                                else
                                        value = value.toUpperCase();
                                // Do not allow user to specify multiple values for the same key
                                if (properties.put(key, value) != null)
                                {
                                        {if (true) throw StandardException.newException(SQLState.LANG_DUPLICATE_PROPERTY, key);}
                                }
                }
        }
View Full Code Here

Examples of org.apache.derby.iapi.services.io.FormatableProperties

                                                    null,
                                                    getContextManager());

    //we would like to use references index & table scan instead of
    //what optimizer says for the dependent table scan.
    Properties targetProperties = new FormatableProperties();
    targetProperties.put("index", "null");
    ((FromBaseTable) fromTable).setTableProperties(targetProperties);

        fromList.addFromTable(fromTable);
        SelectNode resultSet = (SelectNode) nodeFactory.getNode(
                                                     C_NodeTypes.SELECT_NODE,
View Full Code Here

Examples of org.apache.derby.iapi.services.io.FormatableProperties

                                                    getContextManager());


    //we would like to use references index & table scan instead of
    //what optimizer says for the dependent table scan.
    Properties targetProperties = new FormatableProperties();
    targetProperties.put("index", "null");
    ((FromBaseTable) fromTable).setTableProperties(targetProperties);

        fromList.addFromTable(fromTable);

        SelectNode resultSet = (SelectNode) nodeFactory.getNode(
View Full Code Here

Examples of org.apache.derby.iapi.services.io.FormatableProperties

* only eg impl/load/import.java specifies property insertMode=replace/bulkInsert
* in the insert statement. This same property will not be acceptable from an
* insert statement from a user sql.
*/
  final public Properties propertyList(boolean propertiesUseAllowed) throws ParseException, StandardException {
        Properties properties = new FormatableProperties();
        StringTokenizer commaSeparatedProperties;
        StringTokenizer equalOperatorSeparatedProperty;
    jj_consume_token(DERBYDASHPROPERTIES);
                //first use StringTokenizer to get tokens which are delimited by ,s
                commaSeparatedProperties = new StringTokenizer(getToken(1).image,",");
                while (commaSeparatedProperties.hasMoreTokens()) {
                        //Now verify that tokens delimited by ,s follow propertyName=value pattern
                        String currentProperty = commaSeparatedProperties.nextToken();
                        equalOperatorSeparatedProperty = new StringTokenizer(currentProperty,"=", true);
                        if (equalOperatorSeparatedProperty.countTokens() != 3)
                                {if (true) throw StandardException.newException(SQLState.PROPERTY_SYNTAX_INVALID);}
                        else {
                                String key = equalOperatorSeparatedProperty.nextToken().trim();
                                if (!equalOperatorSeparatedProperty.nextToken().equals("="))
                                        {if (true) throw StandardException.newException(SQLState.PROPERTY_SYNTAX_INVALID);}
                                String value = equalOperatorSeparatedProperty.nextToken().trim();
                                verifyImageLength(value);
                                /* Trim off the leading and trailing ', and compress all '' to ' */
                                if (value.startsWith("'") && value.endsWith("'"))
                                        value = StringUtil.compressQuotes(value.substring(1, value.length() - 1), SINGLEQUOTES);
                                /* Trim off the leading and trailing ", and compress all "" to " */
                                else if (value.startsWith("\"") && value.endsWith("\""))
                                        value = StringUtil.compressQuotes(value.substring(1, value.length() - 1), DOUBLEQUOTES);
                                else
                                        value = value.toUpperCase();
                                // Do not allow user to specify multiple values for the same key
                                if (properties.put(key, value) != null)
                                {
                                        {if (true) throw StandardException.newException(SQLState.LANG_DUPLICATE_PROPERTY, key);}
                                }
                }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.