Delete the Tile Scaling extension including the extension entries and
custom tables

@param geoPackage
GeoPackage
@since 3.2.0
769512
public static void deleteTileScalingExtension(GeoPackageCore geoPackage) {

		TileScalingDao tileScalingDao = geoPackage.getTileScalingDao();
		ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();
		try {
			if (tileScalingDao.isTableExists()) {
				geoPackage.dropTable(tileScalingDao.getTableName());
			}
			if (extensionsDao.isTableExists()) {
				extensionsDao
						.deleteByExtension(TileTableScaling.EXTENSION_NAME);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete Tile Scaling extension and table. GeoPackage: "
							+ geoPackage.getName(), e);
		}

	}
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;
	}
931553
public int deleteProperty(String property) {
		int count = 0;
		for (String geoPackage : propertiesMap.keySet()) {
			if (deleteProperty(geoPackage, property)) {
				count++;
			}
		}
		return count;
	}
131585
public boolean createOrUpdate(TileScaling tileScaling) {

		boolean success = false;
		tileScaling.setTableName(tableName);

		getOrCreateExtension();
		try {
			if (!tileScalingDao.isTableExists()) {
				geoPackage.createTileScalingTable();
			}

			CreateOrUpdateStatus status = tileScalingDao
					.createOrUpdate(tileScaling);
			success = status.isCreated() || status.isUpdated();

		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to create or update tile scaling for GeoPackage: "
							+ geoPackage.getName() + ", Tile Table: "
							+ tableName, e);
		}

		return success;
	}
1359680
public void deleteTable(String table) {
		try {
			deleteByIdCascade(table, true);
		} catch (SQLException e) {
			throw new GeoPackageException("Failed to delete table: " + table, e);
		}
	}
57635
public static void deleteFeatureStyleExtension(GeoPackageCore geoPackage) {

		FeatureCoreStyleExtension featureStyleExtension = getFeatureStyleExtension(geoPackage);
		if (featureStyleExtension.has()) {
			featureStyleExtension.removeExtension();
		}

	}
127866
public boolean delete(String tableName) {
		boolean deleted = false;
		try {
			if (contentsIdDao.isTableExists()) {
				deleted = contentsIdDao.deleteByTableName(tableName) > 0;
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete Contents Id extension table. GeoPackage: "
							+ geoPackage.getName() + ", Table Name: "
							+ tableName, e);
		}
		return deleted;
	}
1046499
public boolean deleteIndex() {

		boolean deleted = false;

		ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();
		TableIndexDao tableIndexDao = geoPackage.getTableIndexDao();
		try {
			// Delete geometry indices and table index
			if (tableIndexDao.isTableExists()) {
				deleted = tableIndexDao.deleteByIdCascade(tableName) > 0;
			}
			// Delete the extensions entry
			if (extensionsDao.isTableExists()) {
				deleted = extensionsDao.deleteByExtension(EXTENSION_NAME,
						tableName) > 0 || deleted;
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete Table Index. GeoPackage: "
							+ geoPackage.getName() + ", Table: " + tableName, e);
		}

		return deleted;
	}
720677
private static RelatedTablesCoreExtension getRelatedTableExtension(
			GeoPackageCore geoPackage) {
		return new RelatedTablesCoreExtension(geoPackage) {
			@Override
			public String getPrimaryKeyColumnName(String tableName) {
				return null;
			}
		};
	}
669188
@Override
  public void exitStandardFileOptionJavaPackage(final StandardFileOptionJavaPackageContext ctx) {
    verifyOptionNameUnique("javaPackage", ctx.getStart());
    scopes.getFileOptions().setJavaPackage(removeQuotes(ctx.StringLiteral().getText()));
  }
1257592
private int clearGeometryIndices() {
		int deleted = 0;
		DeleteBuilder<GeometryIndex, GeometryIndexKey> db = geometryIndexDao
				.deleteBuilder();
		try {
			db.where().eq(GeometryIndex.COLUMN_TABLE_NAME, tableName);
			PreparedDelete<GeometryIndex> deleteQuery = db.prepare();
			deleted = geometryIndexDao.delete(deleteQuery);
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to clear Geometry Index rows for GeoPackage: "
							+ geoPackage.getName() + ", Table Name: "
							+ tableName + ", Column Name: " + columnName, e);
		}

		return deleted;
	}
250148
public boolean delete() {

		boolean deleted = false;

		ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();
		try {
			if (tileScalingDao.isTableExists()) {
				deleted = tileScalingDao.deleteById(tableName) > 0;
			}
			if (extensionsDao.isTableExists()) {
				deleted = extensionsDao.deleteByExtension(EXTENSION_NAME,
						tableName) > 0 || deleted;
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete tile table scaling for GeoPackage: "
							+ geoPackage.getName() + ", Table: " + tableName, e);
		}

		return deleted;
	}
793281
public void removeExtension() {

		try {
			if (extendedRelationsDao.isTableExists()) {
				List<ExtendedRelation> extendedRelations = extendedRelationsDao
						.queryForAll();
				for (ExtendedRelation extendedRelation : extendedRelations) {
					geoPackage.deleteTable(extendedRelation
							.getMappingTableName());
				}
				geoPackage.dropTable(extendedRelationsDao.getTableName());
			}
			if (extensionsDao.isTableExists()) {
				extensionsDao.deleteByExtension(EXTENSION_NAME);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete Related Tables extension and table. GeoPackage: "
							+ geoPackage.getName(), e);
		}
	}
965589
public void deleteMetadata(String templateName) {
        String scope = Metadata.scopeBasedOnType(templateName);
        this.deleteMetadata(templateName, scope);
    }
670473
public static void deleteRTreeSpatialIndexExtension(
			GeoPackageCore geoPackage) {

		RTreeIndexCoreExtension rTreeIndexExtension = getRTreeIndexExtension(geoPackage);
		if (rTreeIndexExtension.has()) {
			rTreeIndexExtension.deleteAll();
		}

	}
1066050
public int deleteValue(String property, String value) {
		int count = 0;
		for (String geoPackage : propertiesMap.keySet()) {
			if (deleteValue(geoPackage, property, value)) {
				count++;
			}
		}
		return count;
	}
489225
public boolean has() {

		boolean exists = false;
		try {
			exists = has(EXTENSION_NAME, tableName, null)
					&& tileScalingDao.isTableExists()
					&& tileScalingDao.idExists(tableName);
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to check for tile scaling for GeoPackage: "
							+ geoPackage.getName() + ", Tile Table: "
							+ tableName, e);
		}

		return exists;
	}