Query by extension name

@param extensionName
extension name
@return extensions
@throws SQLException
upon failure
343617
public List<Extensions> queryByExtension(String extensionName)
			throws SQLException {

		QueryBuilder<Extensions, Void> qb = queryBuilder();

		setUniqueWhere(qb.where(), extensionName, false, null, false, null);

		List<Extensions> extensions = qb.query();

		return extensions;
	}
516814
public List<String> getTables() {
		List<String> tables = new ArrayList<>();
		List<Extensions> extensions = getExtensions(EXTENSION_NAME);
		if (extensions != null) {
			for (Extensions extension : extensions) {
				tables.add(extension.getTableName());
			}
		}
		return tables;
	}
818860
public boolean has(String tableName, String columnName) {
		return has(EXTENSION_NAME, tableName, columnName)
				&& connection.tableExists(getRTreeTableName(tableName,
						columnName));
	}
692813
public static String getClassNameWithExtension(final String className)
	{
		return new StringBuilder().append(className).append(Kind.SOURCE.extension).toString();
	}
1077868
public static String getExtension(String filename)
   {
      int index = filename.lastIndexOf('.');

      if (index >= 0)
      {
         return filename.substring(index + 1);
      }

      return "";
   }
1152972
public Extension get(String alias) {
        X509AttributeName attr = new X509AttributeName(alias);
        String name;
        String id = attr.getPrefix();
        if (id.equalsIgnoreCase(X509CertImpl.NAME)) { // fully qualified
            int index = alias.lastIndexOf(".");
            name = alias.substring(index + 1);
        } else
            name = alias;
        return map.get(name);
    }
356945
def list_extensions(self):
        """"""
        r = request.ListExtensions(display = self.display)
        return r.names
930704
public static ProductExtensionInfo getProductExtension(String extensionName) throws IOException {
        ProductExtensionInfo productExtensionInfo = null;

        List<ProductExtensionInfo> productExtensionList = getProductExtensions(Utils.getInstallDir());

        for (ProductExtensionInfo currentProductExtension : productExtensionList) {
            if (currentProductExtension.getName().equalsIgnoreCase(extensionName)) {
                productExtensionInfo = currentProductExtension;
                break;
            }
        }

        return productExtensionInfo;
    }
48169
def get_extension_by_id(self, extension_id, version=None, flags=None):
        
        route_values = {}
        if extension_id is not None:
            route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str')
        query_parameters = {}
        if version is not None:
            query_parameters['version'] = self._serialize.query('version', version, 'str')
        if flags is not None:
            query_parameters['flags'] = self._serialize.query('flags', flags, 'str')
        response = self._send(http_method='GET',
                              location_id='a41192c8-9525-4b58-bc86-179fa549d80d',
                              version='5.0-preview.2',
                              route_values=route_values,
                              query_parameters=query_parameters)
        return self._deserialize('PublishedExtension', response)
710845
protected List<Extensions> getExtensions(String extensionName,
			String tableName) {

		List<Extensions> extensions = null;
		try {
			if (extensionsDao.isTableExists()) {
				extensions = extensionsDao.queryByExtension(extensionName,
						tableName);
			}
		} catch (SQLException e) {
			throw new GeoPackageException("Failed to query for '"
					+ extensionName + "' extension for GeoPackage: "
					+ geoPackage.getName() + ", Table Name: " + tableName, e);
		}
		return extensions;
	}
577351
public Extension getExtension(ObjectIdentifier oid) {
        if (extensions == null)
            return null;

        // following returns null if no such OID in map
        //XXX consider cloning this
        return extensions.get(OIDMap.getName(oid));
    }
1202746
public function getNameWithExtension()
    {
        return $this->extension === '' ? $this->name : sprintf('%s.%s', $this->name, $this->extension);
    }
178270
public static function extInfo($extensionName)
    {

        $result = self::_getExtension($extensionName);
        if ($result) {
            $extensionName = $result['name'];
        }

        return self::i()->dump($result, '! extension (' . $extensionName . ') !');
    }
1248857
public void addExtension(String name) throws Exception {
        // /extension=<name>/:add(module=<name>)
        final ModelNode request = createRequest(ADD, Address.root().add(EXTENSION, name));
        request.get(MODULE).set(name);
        final ModelNode response = execute(request);
        if (!isSuccess(response)) {
            throw new FailureException(response, "Failed to add new module extension [" + name + "]");
        }
        return;
    }
277321
public Extensions getOrCreate(String tableName, String columnName,
			GeometryType geometryType) {

		String extensionName = getExtensionName(geometryType);
		Extensions extension = getOrCreate(extensionName, tableName,
				columnName, GEOMETRY_TYPES_EXTENSION_DEFINITION,
				ExtensionScopeType.READ_WRITE);

		return extension;
	}
726577
@Override
	public int update(Extensions extensions) throws SQLException {

		UpdateBuilder<Extensions, Void> ub = updateBuilder();
		ub.updateColumnValue(Extensions.COLUMN_DEFINITION,
				extensions.getDefinition());
		ub.updateColumnValue(Extensions.COLUMN_SCOPE, extensions.getScope()
				.getValue());

		setUniqueWhere(ub.where(), extensions.getExtensionName(), true,
				extensions.getTableName(), true, extensions.getColumnName());

		PreparedUpdate<Extensions> update = ub.prepare();
		int updated = update(update);

		return updated;
	}
81881
@Override
  public ResultSet executeQuery(String sql) throws SQLException
  {
    raiseSQLExceptionIfStatementIsClosed();
    return executeQueryInternal(sql, null);
  }