Codota Logo
DatabaseConnection.isTableExists
Code IndexAdd Codota to your IDE (free)

How to use
isTableExists
method
in
com.j256.ormlite.support.DatabaseConnection

Best Java code snippets using com.j256.ormlite.support.DatabaseConnection.isTableExists (Showing top 5 results out of 315)

  • Common ways to obtain DatabaseConnection
private void myMethod () {
DatabaseConnection d =
  • Codota IconDao dao;dao.startThreadConnection()
  • Codota IconConnectionSource connectionSource;connectionSource.getReadWriteConnection()
  • Smart code suggestions by Codota
}
origin: j256/ormlite-core

  @Override
  public boolean isTableExists(String tableName) throws SQLException {
    if (proxy == null) {
      return false;
    } else {
      return proxy.isTableExists(tableName);
    }
  }
}
origin: com.j256.ormlite/ormlite-core

  @Override
  public boolean isTableExists(String tableName) throws SQLException {
    if (proxy == null) {
      return false;
    } else {
      return proxy.isTableExists(tableName);
    }
  }
}
origin: j256/ormlite-core

@Override
public boolean isTableExists() throws SQLException {
  checkForInitialized();
  DatabaseConnection connection = connectionSource.getReadOnlyConnection(tableInfo.getTableName());
  try {
    return connection.isTableExists(tableInfo.getTableName());
  } finally {
    connectionSource.releaseConnection(connection);
  }
}
origin: com.j256.ormlite/ormlite-core

@Override
public boolean isTableExists() throws SQLException {
  checkForInitialized();
  DatabaseConnection connection = connectionSource.getReadOnlyConnection(tableInfo.getTableName());
  try {
    return connection.isTableExists(tableInfo.getTableName());
  } finally {
    connectionSource.releaseConnection(connection);
  }
}
origin: j256/ormlite-core

@Test
public void testIsTableExists() throws Exception {
  DatabaseConnection conn = createMock(DatabaseConnection.class);
  boolean tableExists = true;
  String tableName = "fjewfjwef";
  expect(conn.isTableExists(tableName)).andReturn(tableExists);
  conn.close();
  DatabaseConnectionProxy proxy = new DatabaseConnectionProxy(conn);
  replay(conn);
  assertEquals(tableExists, proxy.isTableExists(tableName));
  proxy.close();
  verify(conn);
}
com.j256.ormlite.supportDatabaseConnectionisTableExists

Javadoc

Return true if the table exists in the database.

Popular methods of DatabaseConnection

  • executeStatement
    Execute a statement directly on the connection.
  • isAutoCommit
    Return if auto-commit is currently enabled.
  • setAutoCommit
    Set the auto-commit to be on (true) or off (false). Setting auto-commit to true may or may-not cause
  • commit
    Commit all changes since the savepoint was created. If savePoint is null then commit all outstanding
  • compileStatement
    Like compileStatement(String, StatementType, FieldType[]) except the caller can specify the result f
  • setSavePoint
    Start a save point with a certain name. It can be a noop if savepoints are not supported.
  • close
  • closeQuietly
    Close the connection to the database but swallow any exceptions.
  • insert
    Perform a SQL update while with the associated SQL statement, arguments, and types. This will possib
  • isAutoCommitSupported
    Return if auto-commit is supported.
  • queryForLong
    Perform a query whose result should be a single long-integer value.
  • rollback
    Roll back all changes since the savepoint was created. If savePoint is null then roll back all outst
  • queryForLong,
  • rollback,
  • delete,
  • isClosed,
  • queryForOne,
  • update,
  • releaseSavePoint

Popular in Java

  • Reactive rest calls using spring rest template
  • findViewById (Activity)
  • startActivity (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • Runner (org.openjdk.jmh.runner)
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