Assert that table does not exist in a database.

@param db Database.
@param tableName Table name.
@throws DBAssertionError If the assertion fails.
@see #assertTableExists(DB,String)
@see #drop(Table)
172614
public static void assertTableDoesNotExist(DB db, String tableName) throws DBAssertionError {
    DBAssert.assertTableExistence(CallInfo.create(), db, tableName, false);
  }
652908
public void checkTableName(final String name) {
        if (name.charAt(0) == SINGLE_QUOTE) {
            throw new IllegalArgumentException(
                    "Table name should not start with " + SINGLE_QUOTE + ": " + name);
        }
        for (int i = 0; i < name.length(); i++) {
            final char c = name.charAt(i);
            for (final char fc : FORBIDDEN_CHARS) {
                if (c == fc) {
                    throw new IllegalArgumentException(
                            "Table name should not contain " + new String(FORBIDDEN_CHARS) +
                                    ": " + name);
                }
            }
        }
    }
518454
private static boolean tableExists(CallInfo callInfo, DB db, String tableName) {
    return db.access(callInfo, () -> { 
      DatabaseMetaData dbmd = db.getConnection().getMetaData();
      try(ResultSet rs = dbmd.getTables(null, null, null, new String[] {"TABLE"})) {
        while(rs.next()) { 
          if (tableName.equalsIgnoreCase(rs.getString("TABLE_NAME"))) {
            return true;
          }
        }
      }
      return false;
    });
  }
250824
def drop_table(self, tablename, silent=False):
        
        if not silent and not self.is_table_existed(tablename):
            raise MonSQLException('TABLE %s DOES NOT EXIST' %tablename)

        self.__cursor.execute('DROP TABLE IF EXISTS %s' %(tablename))
        self.__db.commit()
1227409
function tableExists(Connection $db, $table) {
    $q = $db->prepare("SHOW TABLES LIKE ?");
    $q->execute(array($table));

    if ($q->fetch()) {
      return true;
    } else {
      return false;
    }
  }
1016380
@SafeVarargs
  public static void assertDeleted(String message, DataSet... dataSets) throws DBAssertionError {
    multipleDeleteAssertions(CallInfo.create(message), dataSets);
  }
1273306
private void verifyTableExists(BaseDaoImpl<?, ?> dao) {
		try {
			if (!dao.isTableExists()) {
				throw new GeoPackageException(
						"Table or view does not exist for: "
								+ dao.getDataClass().getSimpleName());
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to detect if table or view exists for dao: "
							+ dao.getDataClass().getSimpleName(), e);
		}
	}
71444
public boolean exists(long featureId, String database, String table) {
        boolean exists = false;
        Map<String, Map<Long, FeatureShape>> tables = databases.get(database);
        if (tables != null) {

            Map<Long, FeatureShape> featureIds = tables.get(table);
            if (featureIds != null) {
                FeatureShape shapes = featureIds.get(featureId);
                exists = shapes != null && shapes.hasShapes();
            }
        }
        return exists;
    }
1349417
public void checkAndCreateTable(String tabName, String colFamName) throws IOException {
        HBaseAdmin hba;
        try {
            hba = new HBaseAdmin(this.getHbcfg());
            if (hba.tableExists(tabName) == false) {
                logger.debug("creating table " + tabName);
                final HTableDescriptor tableDescriptor = new HTableDescriptor(tabName);
                final HColumnDescriptor columnDescriptor = new HColumnDescriptor(colFamName);
		columnDescriptor.setMaxVersions(MAX_VALUE);
		tableDescriptor.addFamily(columnDescriptor);
                hba.createTable(tableDescriptor);
            } else {
                logger.debug("already existent table " + tabName);
            }
            hba.close();
        } catch (MasterNotRunningException e) {
            throw new IOException(e);
        } catch (ZooKeeperConnectionException e) {
            throw new IOException(e);
        } catch (IOException e) {
            throw new IOException(e);
        }
    }
526562
protected function tableExistsReadinessCheck($database, $table)
    {
        $url = $this->config->get('URL');
        $dbc = $this->connection;
        $dbc->selectDB($database);
        if (!$dbc->tableExists($table)) {
            $this->error_text = "<p>Missing table {$database}.{$table}
                            <br /><a href=\"{$url}install/\">Click Here</a> to
                            create necessary tables.</p>";
            return false;
        }

        return true;
    }
836890
@Then("^a Mongo dataBase '(.+?)' doesnt contains a table '(.+?)'$")
    public void aMongoDataBaseContainsaTable(String database, String tableName) {
        commonspec.getMongoDBClient().connectToMongoDBDataBase(database);
        Set<String> collectionsNames = commonspec.getMongoDBClient().getMongoDBCollections();
        assertThat(collectionsNames).as("The Mongo dataBase contains the table").doesNotContain(tableName);
    }
718481
boolean exists(final String tableName, final Object rowKey) throws UncheckedIOException {
        return exists(tableName, AnyGet.of(rowKey));
    }
897727
@Override
    protected void create(List<TableInfo> tableInfos)
    {

        for (TableInfo tableInfo : tableInfos)
        {
            try
            {
                if (client.tableExists(tableInfo.getTableName()))
                {
                    client.deleteTable(tableInfo.getTableName());
                }
            }
            catch (Exception e)
            {
                logger.error("Cannot check table existence for table " + tableInfo.getTableName() + ". Caused By: " + e);
                throw new KunderaException("Cannot check table existence for table " + tableInfo.getTableName()
                        + ". Caused By: " + e);
            }
            createKuduTable(tableInfo);
        }
    }
609567
public int deleteByTableName(String tableName) throws SQLException {

		DeleteBuilder<Extensions, Void> db = deleteBuilder();

		db.where().eq(Extensions.COLUMN_TABLE_NAME, tableName);

		int deleted = db.delete();

		return deleted;
	}
160114
def table_exists?(name)
      return false unless name
      schema ? @connection.table_exists?(name, schema) : @connection.table_exists?(name)
    end
1286868
private HBaseQueueAdmin ensureTableExists(QueueName queueName) throws IOException {
    HBaseQueueAdmin admin = queueAdmin;
    try {
      if (!admin.exists(queueName)) {
        admin.create(queueName);
      }
    } catch (Exception e) {
      throw new IOException("Failed to open table " + admin.getActualTableName(queueName), e);
    }
    return admin;
  }
609910
protected static boolean checkTableExist(Jdbc jdbc, String tableName) {
		String sql = "select 1 from " + tableName + " limit 1;";
		try {
			jdbc.queryForInt(sql);
			return true;
		}
		catch (BadSqlGrammarException e) {
			return false;
		}

	}