Tabnine Logo
DbException.getSyntaxError
Code IndexAdd Tabnine to your IDE (free)

How to use
getSyntaxError
method
in
org.h2.message.DbException

Best Java code snippets using org.h2.message.DbException.getSyntaxError (Showing top 20 results out of 315)

origin: com.h2database/h2

private static void checkRunOver(int i, int len, String sql) {
  if (i >= len) {
    throw DbException.getSyntaxError(sql, i);
  }
}
origin: com.h2database/h2

private String readColumnIdentifier() {
  if (currentTokenType != IDENTIFIER) {
    throw DbException.getSyntaxError(sqlCommand, parseIndex,
        "identifier");
  }
  String s = currentToken;
  read();
  return s;
}
origin: com.h2database/h2

private DbException getSyntaxError() {
  if (expectedList == null || expectedList.isEmpty()) {
    return DbException.getSyntaxError(sqlCommand, parseIndex);
  }
  StatementBuilder buff = new StatementBuilder();
  for (String e : expectedList) {
    buff.appendExceptFirst(", ");
    buff.append(e);
  }
  return DbException.getSyntaxError(sqlCommand, parseIndex,
      buff.toString());
}
origin: com.h2database/h2

  int j = sql.indexOf("$$", i + 2);
  if (j < 0) {
    throw DbException.getSyntaxError(sql, i);
int j = sql.indexOf('\'', i + 1);
if (j < 0) {
  throw DbException.getSyntaxError(sql, i);
int j = sql.indexOf('"', i + 1);
if (j < 0) {
  throw DbException.getSyntaxError(sql, i);
    throw DbException.getSyntaxError(sql, i);
origin: com.h2database/h2

private String readString() {
  Expression expr = readExpression().optimize(session);
  if (!(expr instanceof ValueExpression)) {
    throw DbException.getSyntaxError(sqlCommand, parseIndex, "string");
  }
  return expr.getValue(session).getString();
}
origin: com.h2database/h2

private String readIdentifierWithSchema(String defaultSchemaName) {
  if (currentTokenType != IDENTIFIER) {
    throw DbException.getSyntaxError(sqlCommand, parseIndex,
        "identifier");
    schemaName = s;
    if (currentTokenType != IDENTIFIER) {
      throw DbException.getSyntaxError(sqlCommand, parseIndex,
          "identifier");
      schemaName = s;
      if (currentTokenType != IDENTIFIER) {
        throw DbException.getSyntaxError(sqlCommand, parseIndex,
            "identifier");
origin: com.h2database/h2

private Query compileViewQuery(Session session, String sql, boolean literalsChecked, String viewName) {
  Prepared p;
  session.setParsingCreateView(true, viewName);
  try {
    p = session.prepare(sql, false, literalsChecked);
  } finally {
    session.setParsingCreateView(false, viewName);
  }
  if (!(p instanceof Query)) {
    throw DbException.getSyntaxError(sql, 0);
  }
  Query q = (Query) p;
  // only potentially recursive cte queries need to be non-lazy
  if (isTableExpression && allowRecursive) {
    q.setNeverLazy(true);
  }
  return q;
}
origin: com.h2database/h2

private long readLong() {
  boolean minus = false;
  if (currentTokenType == MINUS) {
    minus = true;
    read();
  } else if (currentTokenType == PLUS) {
    read();
  }
  if (currentTokenType != VALUE) {
    throw DbException.getSyntaxError(sqlCommand, parseIndex, "long");
  }
  if (minus) {
    // must do that now, otherwise Long.MIN_VALUE would not work
    currentValue = currentValue.negate();
  }
  long i = currentValue.getLong();
  read();
  return i;
}
origin: com.h2database/h2

private int readInt() {
  boolean minus = false;
  if (currentTokenType == MINUS) {
    minus = true;
    read();
  } else if (currentTokenType == PLUS) {
    read();
  }
  if (currentTokenType != VALUE) {
    throw DbException.getSyntaxError(sqlCommand, parseIndex, "integer");
  }
  if (minus) {
    // must do that now, otherwise Integer.MIN_VALUE would not work
    currentValue = currentValue.negate();
  }
  int i = currentValue.getInt();
  read();
  return i;
}
origin: com.h2database/h2

      throw DbException.getSyntaxError(sql, i, "=");
case '}':
  if (--level < 0) {
    throw DbException.getSyntaxError(sql, i);
throw DbException.getSyntaxError(sql, sql.length() - 1);
origin: com.h2database/h2

if (list.size() == 4) {
  if (!equalsToken(database.getShortName(), list.remove(0))) {
    throw DbException.getSyntaxError(sqlCommand, parseIndex,
        "database name");
  throw DbException.getSyntaxError(sqlCommand, parseIndex,
      "table.column");
origin: com.h2database/h2

throw DbException.getSyntaxError(sql, 1);
origin: com.h2database/h2

if (currentTokenType != VALUE ||
    currentValue.getType() != Value.INT) {
  throw DbException.getSyntaxError(sqlCommand, parseIndex,
      "integer");
origin: org.wowtools/h2

private static void checkRunOver(int i, int len, String sql) {
  if (i >= len) {
    throw DbException.getSyntaxError(sql, i);
  }
}
origin: com.eventsourcing/h2

private static void checkRunOver(int i, int len, String sql) {
  if (i >= len) {
    throw DbException.getSyntaxError(sql, i);
  }
}
origin: com.eventsourcing/h2

private String readColumnIdentifier() {
  if (currentTokenType != IDENTIFIER) {
    throw DbException.getSyntaxError(sqlCommand, parseIndex,
        "identifier");
  }
  String s = currentToken;
  read();
  return s;
}
origin: org.wowtools/h2

private String readColumnIdentifier() {
  if (currentTokenType != IDENTIFIER) {
    throw DbException.getSyntaxError(sqlCommand, parseIndex,
        "identifier");
  }
  String s = currentToken;
  read();
  return s;
}
origin: org.wowtools/h2

private DbException getSyntaxError() {
  if (expectedList == null || expectedList.size() == 0) {
    return DbException.getSyntaxError(sqlCommand, parseIndex);
  }
  StatementBuilder buff = new StatementBuilder();
  for (String e : expectedList) {
    buff.appendExceptFirst(", ");
    buff.append(e);
  }
  return DbException.getSyntaxError(sqlCommand, parseIndex,
      buff.toString());
}
origin: org.wowtools/h2

private String readString() {
  Expression expr = readExpression().optimize(session);
  if (!(expr instanceof ValueExpression)) {
    throw DbException.getSyntaxError(sqlCommand, parseIndex, "string");
  }
  String s = expr.getValue(session).getString();
  return s;
}
origin: com.eventsourcing/h2

private String readString() {
  Expression expr = readExpression().optimize(session);
  if (!(expr instanceof ValueExpression)) {
    throw DbException.getSyntaxError(sqlCommand, parseIndex, "string");
  }
  String s = expr.getValue(session).getString();
  return s;
}
org.h2.messageDbExceptiongetSyntaxError

Javadoc

Create a syntax error exception.

Popular methods of DbException

  • getUnsupportedException
    Gets a SQL exception meaning this feature is not supported.
  • throwInternalError
    Throw an internal error. This method seems to return an exception object, so that it can be used ins
  • convert
    Convert a throwable to an SQL exception using the default mapping. All errors except the following a
  • get
    Create a database exception for a specific error code.
  • <init>
  • addSQL
    Set the SQL statement of the given exception. This method may create a new object.
  • convertIOException
    Convert an IO exception to a database exception.
  • convertInvocation
    Convert an InvocationTarget exception to a database exception.
  • convertToIOException
    Convert an exception to an IO exception.
  • getCause
  • getErrorCode
    Get the error code.
  • getInvalidValueException
    Gets a SQL exception meaning this value is invalid.
  • getErrorCode,
  • getInvalidValueException,
  • getJdbcSQLException,
  • getMessage,
  • getSQLException,
  • getSource,
  • printStackTrace,
  • setSource,
  • toSQLException

Popular in Java

  • Creating JSON documents from java classes using gson
  • getApplicationContext (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now