thanosql.resources._schema

Module Contents

Classes

SchemaService

Service layer for schema methods.

class thanosql.resources._schema.SchemaService(client: thanosql._client.ThanoSQL)[source]

Bases: thanosql._service.ThanoSQLService

Service layer for schema methods.

client

The ThanoSQL client used to make requests to the engine.

Type:

ThanoSQL

list() dict[source]

Lists schemas stored in the workspace.

Does not have any parameters.

Returns:

A dictionary containing the names of stored schemas in the format of:

{
    "schemas": [
        {
            "name": "string"
        }
    ]
}

Return type:

dict

create(name: str) dict[source]

Creates a new schema in the workspace.

Parameters:

name (str) – The name of the schema to be created.

Returns:

A dictionary containing the name of the created schema and a success message in the format of:

{
    "schema": "string",
    "message": "string"
}

Return type:

dict