congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Query.scalarOrNull
Code IndexAdd Tabnine to your IDE (free)

How to use
scalarOrNull
method
in
leap.orm.query.Query

Best Java code snippets using leap.orm.query.Query.scalarOrNull (Showing top 6 results out of 315)

origin: org.leapframework/leap-orm

/**
 * Returns the scalar value or <code>null</code> if n o records returned.
 *
 * @throws TooManyRecordsException if two or more records returned.
 */
default <T> T scalarValueOrNull(Class<T> type) throws TooManyRecordsException {
  Scalar scalar = scalarOrNull();
  return null == scalar ? null : scalar.get(type);
}

origin: org.leapframework/leap-orm

/**
 * Returns the scalar value or <code>null</code> if n o records returned.
 *
 * @throws TooManyRecordsException if two or more records returned.
 */
default <T> T scalarValueOrNull() throws TooManyRecordsException {
  Scalar scalar = scalarOrNull();
  return null == scalar ? null : (T)scalar.get();
}
origin: org.leapframework/jmms-core

public Boolean queryBoolean(String sql, Map<String, Object> params) {
  return createQuery(sql, params).scalarOrNull().get(Boolean.class);
}
origin: org.leapframework/jmms-core

public Double queryDouble(String sql, Map<String, Object> params) {
  return createQuery(sql, params).scalarOrNull().get(Double.class);
}
origin: org.leapframework/jmms-core

public String queryString(String sql, Map<String, Object> params) {
  return createQuery(sql, params).scalarOrNull().getString();
}
origin: org.leapframework/jmms-core

public Object queryScalar(String sql, Map<String, Object> params) {
  return createQuery(sql, params).scalarOrNull().get();
}
leap.orm.queryQueryscalarOrNull

Javadoc

Returns the Scalar value in this query result or null if no records returned.

Popular methods of Query

  • list
    Executes this query and return all the rows as a immutable List object. Returns a empty immutable Li
  • firstOrNull
    Executes this query and return the first row. Returns null if no result returned.
  • params
    Sets a ArrayParams for jdbc placeholders in this query.
  • singleOrNull
    Executes this query and return the first row. Returns null if no result returned.
  • result
    Executes this query and return the query result.
  • scalars
    Returns all the scalar values of the first column in this query result.
  • count
    Executes a count(*) query and returns the total count of records.
  • pageResult
  • param
  • scalar
    Returns the Scalar value in this query result.
  • scalarValueOrNull
    Returns the scalar value or null if n o records returned.
  • scalarValueOrNull

Popular in Java

  • Making http post requests using okhttp
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
  • putExtra (Intent)
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top plugins for Android Studio
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