Codota Logo
Expression.getPrecision
Code IndexAdd Codota to your IDE (free)

How to use
getPrecision
method
in
org.h2.expression.Expression

Best Java code snippets using org.h2.expression.Expression.getPrecision (Showing top 20 results out of 315)

  • Common ways to obtain Expression
private void myMethod () {
Expression e =
  • Codota IconValueExpression.getNull()
  • Codota IconColumn column;column.getDefaultExpression()
  • Codota IconTableFilter tableFilter;tableFilter.getJoinCondition()
  • Smart code suggestions by Codota
}
origin: com.h2database/h2

@Override
public long getColumnPrecision(int i) {
  return expressions[i].getPrecision();
}
origin: com.h2database/h2

@Override
public long getPrecision() {
  return expr.getPrecision();
}
origin: com.h2database/h2

@Override
public long getColumnPrecision(int i) {
  return expressions[i].getPrecision();
}
origin: com.h2database/h2

@Override
public long getPrecision() {
  if (right != null) {
    switch (opType) {
    case CONCAT:
      return left.getPrecision() + right.getPrecision();
    default:
      return Math.max(left.getPrecision(), right.getPrecision());
    }
  }
  return left.getPrecision();
}
origin: com.h2database/h2

@Override
public long getPrecision() {
  return getExpression().getPrecision();
}
origin: com.h2database/h2

case ENCRYPT:
case DECRYPT:
  precision = args[2].getPrecision();
  displaySize = args[2].getDisplaySize();
  break;
case COMPRESS:
  precision = args[0].getPrecision();
  displaySize = args[0].getDisplaySize();
  break;
  displaySize = 0;
  for (Expression e : args) {
    precision += e.getPrecision();
    displaySize = MathUtils.convertLongToInt(
        (long) displaySize + e.getDisplaySize());
  precision = (args[0].getPrecision() + 3) / 4;
  displaySize = MathUtils.convertLongToInt(precision);
  break;
case UTF8TOSTRING:
case TRUNCATE:
  precision = args[0].getPrecision();
  displaySize = args[0].getDisplaySize();
  break;
case RAWTOHEX:
  precision = args[0].getPrecision() * 4;
  displaySize = MathUtils.convertLongToInt(precision);
  break;
origin: com.h2database/h2

@Override
public Expression[] getExpressionColumns(Session session) {
  ExpressionColumn[] expr = new ExpressionColumn[list.length];
  for (int i = 0; i < list.length; i++) {
    Expression e = list[i];
    Column col = new Column("C" + (i + 1),
        e.getType(), e.getPrecision(), e.getScale(),
        e.getDisplaySize());
    expr[i] = new ExpressionColumn(session.getDatabase(), col);
  }
  return expr;
}
origin: apache/ignite

/**
 * @param e Expression to take type from.
 * @return Type.
 */
public static GridSqlType fromExpression(Expression e) {
  if (e.getType() == Value.UNKNOWN)
    return UNKNOWN;
  return fromColumn(new Column(null, e.getType(), e.getPrecision(), e.getScale(), e.getDisplaySize()));
}
origin: com.h2database/h2

Expression r = re.get(i);
int type = Value.getHigherOrder(l.getType(), r.getType());
long prec = Math.max(l.getPrecision(), r.getPrecision());
int scale = Math.max(l.getScale(), r.getScale());
int displaySize = Math.max(l.getDisplaySize(), r.getDisplaySize());
origin: com.h2database/h2

      t = Value.getHigherOrder(t, type);
      s = Math.max(s, e.getScale());
      p = Math.max(p, e.getPrecision());
      d = Math.max(d, e.getDisplaySize());
      t = Value.getHigherOrder(t, type);
      s = Math.max(s, then.getScale());
      p = Math.max(p, then.getPrecision());
      d = Math.max(d, then.getDisplaySize());
      t = Value.getHigherOrder(t, type);
      s = Math.max(s, elsePart.getScale());
      p = Math.max(p, elsePart.getPrecision());
      d = Math.max(d, elsePart.getDisplaySize());
p = Math.max(args[1].getPrecision(), args[2].getPrecision());
d = Math.max(args[1].getDisplaySize(), args[2].getDisplaySize());
s = Math.max(args[1].getScale(), args[2].getScale());
p = Math.max(args[1].getPrecision(), args[2].getPrecision());
d = Math.max(args[1].getDisplaySize(), args[2].getDisplaySize());
s = Math.max(args[1].getScale(), args[2].getScale());
t = p0.getType();
s = p0.getScale();
p = p0.getPrecision();
d = p0.getDisplaySize();
if (t == Value.NULL) {
origin: com.h2database/h2

  columns.add(column);
prec = expr.getPrecision();
scale = expr.getScale();
displaySize = expr.getDisplaySize();
origin: com.h2database/h2

int type = expr.getType();
String name = columnNamer.getColumnName(expr,i,expr.getAlias());
long precision = expr.getPrecision();
int displaySize = expr.getDisplaySize();
DataType dt = DataType.getDataType(type);
origin: com.h2database/h2

  type = expr.getType();
long precision = expr.getPrecision();
int scale = expr.getScale();
int displaySize = expr.getDisplaySize();
origin: com.h2database/h2

dataType = on.getType();
scale = on.getScale();
precision = on.getPrecision();
displaySize = on.getDisplaySize();
origin: com.h2database/h2

Column column = ((ExpressionColumn) left).getColumn();
right = ValueExpression.get(r.convertTo(resType,
    MathUtils.convertLongToInt(left.getPrecision()),
    session.getDatabase().getMode(), column, column.getEnumerators()));
origin: org.wowtools/h2

@Override
public long getPrecision() {
  return expr.getPrecision();
}
origin: com.h2database/com.springsource.org.h2

public long getPrecision() {
  if (right != null) {
    switch (opType) {
      case CONCAT:
        return left.getPrecision() + right.getPrecision();
      default:
        return Math.max(left.getPrecision(), right.getPrecision());
    }
  }
  return left.getPrecision();
}
origin: com.eventsourcing/h2

@Override
public long getPrecision() {
  if (right != null) {
    switch (opType) {
    case CONCAT:
      return left.getPrecision() + right.getPrecision();
    default:
      return Math.max(left.getPrecision(), right.getPrecision());
    }
  }
  return left.getPrecision();
}
origin: org.apache.ignite/ignite-indexing

/**
 * @param e Expression to take type from.
 * @return Type.
 */
public static GridSqlType fromExpression(Expression e) {
  if (e.getType() == Value.UNKNOWN)
    return UNKNOWN;
  return fromColumn(new Column(null, e.getType(), e.getPrecision(), e.getScale(), e.getDisplaySize()));
}
origin: com.eventsourcing/h2

@Override
public Expression[] getExpressionColumns(Session session) {
  ExpressionColumn[] expr = new ExpressionColumn[list.length];
  for (int i = 0; i < list.length; i++) {
    Expression e = list[i];
    Column col = new Column("C" + (i + 1),
        e.getType(), e.getPrecision(), e.getScale(),
        e.getDisplaySize());
    expr[i] = new ExpressionColumn(session.getDatabase(), col);
  }
  return expr;
}
org.h2.expressionExpressiongetPrecision

Javadoc

Get the precision of this expression.

Popular methods of Expression

  • getAlias
    Get the alias name of a column or SQL expression if it is not an aliased expression.
  • getDisplaySize
    Get the display size of this expression.
  • getNonAliasExpression
    Returns the main expression, skipping aliases.
  • getNotIfPossible
    If it is possible, return the negated expression. This is used to optimize NOT expressions: NOT ID>1
  • getScale
    Get the scale of this expression.
  • getType
    Return the data type. The data type may not be known before the optimization phase.
  • getValue
    Return the resulting value for the current row.
  • isConstant
    Check if this expression will always return the same value.
  • addFilterConditions
    Add conditions to a table filter if they can be evaluated.
  • createIndexConditions
    Create index conditions if possible and attach them to the table filter.
  • getBooleanValue
    Get the value in form of a boolean expression. Returns true or false. In this database, everything c
  • getColumnName
    Get the column name or alias name of this expression.
  • getBooleanValue,
  • getColumnName,
  • getCost,
  • getNullable,
  • getSQL,
  • getSchemaName,
  • getTableAlias,
  • getTableName,
  • isAutoIncrement

Popular in Java

  • Finding current android device location
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • putExtra (Intent)
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • JButton (javax.swing)
  • JCheckBox (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now