Codota Logo
Dialect.getArrayElementString
Code IndexAdd Codota to your IDE (free)

How to use
getArrayElementString
method
in
org.nuxeo.ecm.core.storage.sql.jdbc.dialect.Dialect

Best Java code snippets using org.nuxeo.ecm.core.storage.sql.jdbc.dialect.Dialect.getArrayElementString (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: org.nuxeo.ecm.core/nuxeo-core-storage-sql

/** key used to extract array index if needed */
protected String getSelectColName(Column col, String key) {
  String colName = getSelectColName(col);
  if (col.isArray()) {
    String[] segments = canonicalXPath(key).split("/");
    if (segments.length > 1) {
      // last segment
      String segment = segments[segments.length - 1];
      if (INDEX.matcher(segment).matches() && !segment.startsWith("*")) {
        int arrayElementIndex = Integer.parseInt(segment);
        colName = dialect.getArrayElementString(colName, arrayElementIndex);
      }
    }
  }
  return colName;
}
origin: org.nuxeo.ecm.core/nuxeo-core-storage-sql

protected void visitReference(Column column, String cast, int arrayElementIndex) {
  if (DATE_CAST.equals(cast) && column.getType() != ColumnType.TIMESTAMP) {
    throw new QueryParseException("Cannot cast to " + cast + ": " + column);
  }
  String qname = column.getFullQuotedName();
  if (arrayElementIndex != -1) {
    if (column.isArray()) {
      qname = dialect.getArrayElementString(qname, arrayElementIndex);
    } else {
      throw new QueryParseException(
          "Cannot use array index " + arrayElementIndex + " for non-array column " + column);
    }
  }
  // some databases (Derby) can't do comparisons on CLOB
  if (column.getJdbcType() == Types.CLOB) {
    String colFmt = dialect.getClobCast(inOrderBy);
    if (colFmt != null) {
      qname = String.format(colFmt, qname, Integer.valueOf(255));
    }
  }
  if (cast != null) {
    // only DATE cast for now
    String fmt = dialect.getDateCast();
    buf.append(String.format(fmt, qname));
  } else {
    buf.append(qname);
  }
}
org.nuxeo.ecm.core.storage.sql.jdbc.dialectDialectgetArrayElementString

Javadoc

Get SQL Array Element Subscripted string.

Popular methods of Dialect

  • closeQuote
  • openQuote
  • addPagingClause
    Returns the SQL query with a paging clause
  • createDialect
    Creates a Dialect by connecting to the datasource to check what database is used.
  • getColumnName
  • getLikeEscaping
    Gets the SQL fragment to add after a LIKE match to specify the escaping character.
  • getTableName
  • isConcurrentUpdateException
    Checks if an exception received means that a concurrent update was detected.
  • supportsIlike
    Does the dialect support ILIKE operator
  • supportsPaging
    Indicates if dialect supports paging
  • castIdToVarchar
    Casts an id column to a VARCHAR type. Used for uuid/varchar joins.
  • checkStoredProcedure
    Checks if a given stored procedure exists and is identical to the passed creation SQL. There are 3 c
  • castIdToVarchar,
  • checkStoredProcedure,
  • createArrayOf,
  • doesUpdateFromRepeatSelf,
  • getAddColumnString,
  • getAddForeignKeyConstraintString,
  • getAddPrimaryKeyConstraintString,
  • getAncestorsIdsSql,
  • getArrayIlikeSql

Popular in Java

  • Running tasks concurrently on multiple threads
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
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