# Path: meowth/core/data_manager/errors.py
# class SchemaError(PostgresError):
#     pass


import pydoc
import datetime
import decimal
from .errors import SchemaError


class StringSQL(SQLType):
    python = str

    def to_sql(self):
        return 'TEXT'


class TimeSQL(SQLType):
    python = datetime.time

    def __init__(self, *, timezone=False):
        self.timezone = timezone

    def to_sql(self):
        if self.timezone:
            return 'TIME WITH TIME ZONE'
        return 'TIME'


class JSONSQL(SQLType):
    python = None

    def to_sql(self):
        return 'JSONB'

class ArraySQL(SQLType):
    def __init__(self, inner_type, size: int = None):
        if not isinstance(inner_type, SQLType):

# Path: meowth/core/data_manager/errors.py
# class SchemaError(PostgresError):
#     pass


# Path: meowth/core/data_manager/sqltypes.py
import pydoc
import datetime
import decimal
from .errors import SchemaError



class StringSQL(SQLType):
    python = str

    def to_sql(self):
        return 'TEXT'


class TimeSQL(SQLType):
    python = datetime.time

    def __init__(self, *, timezone=False):
        self.timezone = timezone

    def to_sql(self):
        if self.timezone:
            return 'TIME WITH TIME ZONE'
        return 'TIME'


class JSONSQL(SQLType):
    python = None

    def to_sql(self):
        return 'JSONB'

class ArraySQL(SQLType):
    def __init__(self, inner_type, size: int = None):
        if not isinstance(inner_type, SQLType):

            raise SchemaError('Array inner type must be an SQLType')