public List<Table> tables(Connection connection, String databaseName, String schemaName, String tableName,
                              String types[]) {
        try (ResultSet resultSet = connection.getMetaData().getTables(databaseName, schemaName, tableName, types)) {
            return ResultSetUtils.toObjectList(resultSet, Table.class);
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
    }
Get all database tables

@param connection
@param databaseName
@param schemaName
@param tableName
@param types
@return
chat2db-server/chat2db-spi/src/main/java/ai/chat2db/spi/sql/SQLExecutor.java