Tabnine Logo
JdbcUtils
Code IndexAdd Tabnine to your IDE (free)

How to use
JdbcUtils
in
ca.carleton.gcrc.jdbc

Best Java code snippets using ca.carleton.gcrc.jdbc.JdbcUtils (Showing top 5 results out of 315)

origin: ca.carleton.gcrc/nunaliit2-auth-common

int userId = JdbcUtils.extractIntResult(rs,rsmd,1);
String email = JdbcUtils.extractStringResult(rs,rsmd,2);
String displayName = JdbcUtils.extractStringResult(rs,rsmd,3);
String dbPassword = JdbcUtils.extractStringResult(rs,rsmd,4);
int groupId = JdbcUtils.extractIntResult(rs,rsmd,5);
origin: ca.carleton.gcrc/nunaliit2-jdbc-json

    sqlQuery += JdbcUtils.safeSqlQueryIdentifier(includeString) + ",";
    orderByClause += ",";
  sqlQuery += JdbcUtils.safeSqlQueryIdentifier(fieldString);
  whereClause += "lower(" + JdbcUtils.safeSqlQueryIdentifier(fieldString) + ") LIKE lower(" +
    JdbcUtils.safeSqlQueryStringValue("%" + matchText + "%") + ") ";
  if (1 == fields.size()) {
      JdbcUtils.safeSqlQueryStringValue(matchText) + ") IN lower(" +
      JdbcUtils.safeSqlQueryIdentifier(fieldString) + "))";
  } else {
    if (count < (fields.size() - 1)) {
      orderByClause += "least(coalesce(nullif(position(lower(" +
        JdbcUtils.safeSqlQueryStringValue(matchText) + ") IN lower(" +
        JdbcUtils.safeSqlQueryIdentifier(fieldString) + ")), 0), 9999)";
      orderByClosing += ")";
    } else {
      orderByClause += "coalesce(nullif(position(lower(" +
        JdbcUtils.safeSqlQueryStringValue(matchText) + ") IN lower(" +
        JdbcUtils.safeSqlQueryIdentifier(fieldString) + ")), 0), 9999)";
    JdbcUtils.safeSqlQueryIdentifier(scoreParm);
sqlQuery += " FROM " + JdbcUtils.safeSqlQueryIdentifier(tableParm) +
  whereClause + "ORDER BY " + orderByClause + orderByClosing + ";";
origin: ca.carleton.gcrc/nunaliit2-jdbc-json

    sqlQuery += JdbcUtils.safeSqlQueryIdentifier(includeString) + ",";
sqlQuery += "ST_X(ST_GeometryN(" + JdbcUtils.safeSqlQueryIdentifier(geomParm) +
  ",1)) as " + JdbcUtils.safeSqlQueryIdentifier(xnameParm) + ",";
sqlQuery += "ST_Y(ST_GeometryN(" + JdbcUtils.safeSqlQueryIdentifier(geomParm) +
  ",1)) as " + JdbcUtils.safeSqlQueryIdentifier(ynameParm) + " ";
sqlQuery += "FROM " + JdbcUtils.safeSqlQueryIdentifier(tableParm) + " ";
origin: ca.carleton.gcrc/nunaliit2-jdbc-json

      sqlQuery += ",";
    sqlQuery += JdbcUtils.safeSqlQueryIdentifier(selectString);
sqlQuery += " FROM " + JdbcUtils.safeSqlQueryIdentifier(tableParm);
      sqlQuery += ",";
    sqlQuery += JdbcUtils.safeSqlQueryIdentifier(group);
origin: ca.carleton.gcrc/nunaliit2-jdbc-json

private String GenerateWhereClause(List<Where> whereParms) throws Exception {
  boolean firstSelect = true;
  String retVal = "";
  Iterator<Where> itWhere = whereParms.iterator();
  while( itWhere.hasNext() ) {
    Where where = itWhere.next();
    if( firstSelect ) {
      firstSelect = false;
      retVal += " WHERE ";
    } else {
      retVal += " AND ";
    }
    retVal += (JdbcUtils.safeSqlQueryIdentifier(where.getLeft()) + " " + where.getOp().getSqlQuery() + " ");
    if( null != where.getStringValue() ) {
      retVal += (JdbcUtils.safeSqlQueryStringValue(where.getStringValue()));
    } else {
      retVal += ""+where.getIntValue();
    }
  }
  return(retVal);
}

ca.carleton.gcrc.jdbcJdbcUtils

Most used methods

  • extractIntResult
  • extractStringResult
  • safeSqlQueryIdentifier
  • safeSqlQueryStringValue

Popular in Java

  • Reactive rest calls using spring rest template
  • compareTo (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • setRequestProperty (URLConnection)
  • Kernel (java.awt.image)
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top Sublime Text plugins
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