Delete by table name

@param tableName
table name
@return deleted count
438796
public int delete(String tableName) {
		DeleteBuilder<GriddedTile, Long> db = deleteBuilder();

		int deleted = 0;

		try {
			db.where().eq(GriddedTile.COLUMN_TABLE_NAME, tableName);

			PreparedDelete<GriddedTile> deleteQuery = db.prepare();
			deleted = delete(deleteQuery);
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete Gridded Tile by Table Name: " + tableName,
					e);
		}

		return deleted;
	}
969714
private static int delete(final TSDB tsdb, final byte[] table,
      final String[] args) throws Exception {
    final String kind = args[1];
    final String name = args[2];
    try {
      tsdb.deleteUidAsync(kind, name).join();
    } catch (HBaseException e) {
      LOG.error("error while processing delete " + name, e);
      return 3;
    } catch (NoSuchUniqueName e) {
      LOG.error(e.getMessage());
      return 1;
    }
    LOG.info("UID " + kind + ' ' + name + " deleted.");
    return 0;
  }
11584
public void delete(String tableName) {
		try {
			if (extensionsDao.isTableExists()) {
				List<Extensions> extensions = extensionsDao.queryByExtension(
						EXTENSION_NAME, tableName);
				for (Extensions extension : extensions) {
					delete(extension.getTableName(), extension.getColumnName());
				}
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete RTree Index extensions for table. GeoPackage: "
							+ geoPackage.getName() + ", Table: " + tableName, e);
		}

	}
80918
@NonNull
  public static DeleteSelection deleteFrom(
      @Nullable CqlIdentifier keyspace, @NonNull CqlIdentifier table) {
    return new DefaultDelete(keyspace, table);
  }
1362220
public int deleteLinks(String table) {

		int deleted = 0;

		try {
			if (featureTileLinkDao.isTableExists()) {
				deleted = featureTileLinkDao.deleteByTableName(table);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete feature tile links for GeoPackage: "
							+ geoPackage.getName() + ", Table: " + table, e);
		}

		return deleted;
	}
937774
public void deleteByColumn(String schemaName, String tableName, String columnName, Object columnValue)
    {
        StringBuffer query = new StringBuffer();

        query.append("DELETE FROM ").append(getFromClause(schemaName, tableName)).append(" WHERE ").append(columnName)
                .append("=").append("'").append(columnValue).append("'");

        StatelessSession s = getStatelessSession();

        Transaction tx = onBegin();
        onNativeUpdate(query.toString(), null);
        onCommit(tx);

    }
1105098
public function clearTable(string $tableName): bool
    {
        $delete = new DeleteQuery($this->db);

        return $delete->from($tableName)->execute();
    }
1312719
public Delete createDelete(URI id, String tableName) throws IOException {
        Delete del = null;
        Object tTable = getTable(tableName);
        if (tTable != null) {
            del = new Delete(Bytes.toBytes(id.toString()));
        }
        return del;
    }
1259500
@Override
    public void deleteByColumn(String schemaName, String tableName, String columnName, Object columnValue) {
        Session session = factory.getConnection();
        String rowKeyName = null;
        CQLTranslator translator = new CQLTranslator();
        try {
            List<ColumnMetadata> primaryKeys = session.getCluster().getMetadata().getKeyspace("\"" + schemaName + "\"")
                .getTable("\"" + tableName + "\"").getPrimaryKey();
            rowKeyName = primaryKeys.get(0).getName();
        } finally {
            // factory.releaseConnection(session);
        }

        List rowKeys =
            getColumnsById(schemaName, tableName, columnName, rowKeyName, columnValue, columnValue.getClass());
        for (Object rowKey : rowKeys) {
            if (rowKey != null) {
                String deleteQuery = CQLTranslator.DELETE_QUERY;

                deleteQuery = StringUtils.replace(deleteQuery, CQLTranslator.COLUMN_FAMILY,
                    translator.ensureCase(new StringBuilder(), tableName, false).toString());
                StringBuilder deleteQueryBuilder = new StringBuilder(deleteQuery);
                deleteQueryBuilder.append(CQLTranslator.ADD_WHERE_CLAUSE);
                deleteQueryBuilder = translator.ensureCase(deleteQueryBuilder, rowKeyName, false);
                deleteQueryBuilder.append(CQLTranslator.EQ_CLAUSE);
                translator.appendValue(deleteQueryBuilder, rowKey.getClass(), rowKey, false, false);
                this.execute(deleteQueryBuilder.toString(), null);
            }
        }
    }
1288526
public TableModel removeColumn(String columnName) {
		checkReadOnly();
		List<ColumnModel> oldColumns = this.getColumns();
		Iterator<ColumnModel> columnIter = oldColumns.iterator();
		while (columnIter.hasNext())
			if (columnIter.next().getColumnName().equalsIgnoreCase(columnName))
				columnIter.remove();
		return this;
	}
1237995
@Override
    public java.util.concurrent.Future<DeleteItemResult> deleteItemAsync(String tableName, java.util.Map<String, AttributeValue> key) {

        return deleteItemAsync(new DeleteItemRequest().withTableName(tableName).withKey(key));
    }
561675
public int deleteCascade(PreparedQuery<TableIndex> preparedDelete)
			throws SQLException {
		int count = 0;
		if (preparedDelete != null) {
			List<TableIndex> tableIndexList = query(preparedDelete);
			count = deleteCascade(tableIndexList);
		}
		return count;
	}
109025
public int deleteAll() throws SQLException {

		int count = 0;

		if (isTableExists()) {
			DeleteBuilder<TableIndex, String> db = deleteBuilder();
			PreparedDelete<TableIndex> deleteQuery = db.prepare();
			count = delete(deleteQuery);
		}

		return count;
	}
1359680
public void deleteTable(String table) {
		try {
			deleteByIdCascade(table, true);
		} catch (SQLException e) {
			throw new GeoPackageException("Failed to delete table: " + table, e);
		}
	}
462303
@Override
    public Delete createDelete(URI id, String tableName) throws IOException {
        Delete del = null;
        HTable hTable = getTable(tableName);
        if (hTable != null) {
            del = new Delete(Bytes.toBytes(id.toString()));
        }
        return del;
    }
166458
public int deleteByExtension(String extensionName) throws SQLException {

		DeleteBuilder<Extensions, Void> db = deleteBuilder();
		db.where().eq(Extensions.COLUMN_EXTENSION_NAME, extensionName);

		int deleted = db.delete();

		return deleted;
	}
296988
public function delete($tableName)
    {
        $sql = new Delete($tableName);
        $sql->setAdapter($this->_adapter);
        return $sql;
    }