Examples of allowsPrec()


Examples of org.eigenbase.sql.type.SqlTypeName.allowsPrec()

    }

    protected RelDataType toRelType(Field field, FarragoTypeFactory typeFactory)
    {
        SqlTypeName typeName = convertSfdcSqlToSqlType(field.getType());
        if (typeName.allowsPrec()) {
            if (typeName.allowsScale()) { // only decimal type
                int maxPrecision = SqlTypeName.DECIMAL.MAX_NUMERIC_PRECISION;
                int precision = field.getPrecision();
                int scale = field.getScale();
                if ((precision > maxPrecision) || (scale > precision)) {
View Full Code Here

Examples of org.eigenbase.sql.type.SqlTypeName.allowsPrec()

      this.NUMERIC_PRECISION_RADIX = (sqlType == SqlTypeName.DECIMAL) ? 10 : -1; // TODO: where do we get radix?

      if (sqlType == SqlTypeName.VARCHAR) {
        // Max length is stored as precision in Optiq.
        this.CHARACTER_MAXIMUM_LENGTH = (sqlType.allowsPrec()) ? type.getPrecision() : -1;
        this.NUMERIC_PRECISION = -1;
      } else {
        this.CHARACTER_MAXIMUM_LENGTH = -1;
        this.NUMERIC_PRECISION = (sqlType.allowsPrec()) ? type.getPrecision() : -1;
      }
View Full Code Here

Examples of org.eigenbase.sql.type.SqlTypeName.allowsPrec()

        // Max length is stored as precision in Optiq.
        this.CHARACTER_MAXIMUM_LENGTH = (sqlType.allowsPrec()) ? type.getPrecision() : -1;
        this.NUMERIC_PRECISION = -1;
      } else {
        this.CHARACTER_MAXIMUM_LENGTH = -1;
        this.NUMERIC_PRECISION = (sqlType.allowsPrec()) ? type.getPrecision() : -1;
      }

      this.NUMERIC_SCALE = (sqlType.allowsScale())?type.getScale(): -1;
    }
  }
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.