ObjectDB ObjectDB

Internal Website Search

1-10 of 18 resultsRefresh
152

substring works with string but not with char

i want to select all entities whose name starts with a specific letter, i can use this query with a string parameter select f from Foo f where substring(f.name, 1, 1) = ?1 but when i use a char, the query does not return anything. i think it should also be possible to use char/Character types
101

Strings in JPQL and Criteria Queries

('China') is evaluated to 5. LOCATE - Locating Substrings The LOCATE(str, substr [, start]) function searches a substring and returns its position. For example: LOCATE('India', 'a') is evaluated to 5 ... character is 1. Zero (0) is returned if the substring is not found. The third argument
99

substring(x, from, len)

Method javax.persistence.criteria.CriteriaBuilder Expression<String> substring( Expression<String> x, int from, int len ) Create an expression for substring extraction. Extracts a substring of given ... from - start position len - length Returns: expression corresponding to substring extraction Since: JPA 2.0
99

substring(x, from)

Method javax.persistence.criteria.CriteriaBuilder Expression<String> substring( Expression<String> x, int from ) Create an expression for substring extraction. Extracts a substring starting ... expression from - start position Returns: expression corresponding to substring extraction Since: JPA 2.0
99

substring(x, from, len)

Method javax.persistence.criteria.CriteriaBuilder Expression<T> substring( Expression<T> x, Expression<T> from, Expression<T> len ) Create an expression for substring extraction. Extracts a substring ... expression from - start position expression len - length expression Returns: expression corresponding to substring extraction Since: JPA 2.0
99

substring(x, from, len)

Method javax.persistence.criteria.CriteriaBuilder Expression<String> substring( Expression<String> x, Expression<Integer> from, Expression<Integer> len ) Create an expression for substring extraction. Extracts a substring of given length starting at the specified position. First position is 1
99

substring(x, from)

Method javax.persistence.criteria.CriteriaBuilder Expression<String> substring( Expression<String> x, Expression<Integer> from ) Create an expression for substring extraction. Extracts a substring ... - string expression from - start position expression Returns: expression corresponding to substring extraction Since: JPA 2.0
58

GROUP BY and HAVING clauses

(no Aggregates) The following query groups all the countries by their first letter: SELECT SUBSTRING(c.name, 1, 1) FROM Country c GROUP BY SUBSTRING(c.name, 1, 1); The FROM clause defines iteration ... (which does not use aggregates) is equivalent to the following query: SELECT DISTINCT SUBSTRING(c
35

javax.persistence.criteria.CriteriaBuilder

Returns: square root Since: JPA 2.0 Expression<String> substring( Expression<String> x, int from) Create an expression for substring extraction. Create an expression for substring extraction. Extracts a substring starting at the specified position through to end of the string. First position is 1
26

FROM clause (JPQL / Criteria API)

, NOT, NULL, NULLIF, OBJECT, OF, OR, ORDER, OUTER, POSITION, SELECT, SET, SIZE, SOME, SQRT, SUBSTRING

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support