
from .base import Executable, ColumnCollection
from .elements import ClauseList, Cast, Extract, _literal_as_binds, \
    literal_column, _type_from_args, ColumnElement, _clone,\
    Over, BindParameter, FunctionFilter
from .selectable import FromClause, Select, Alias
from .visitors import VisitableType

class FunctionElement(Executable, ColumnElement, FromClause): ...

class _FunctionGenerator(object):
    def __init__(self, **opts): ...
    def __getattr__(self, name): ...
    def __call__(self, *c, **kwargs) -> Function: ...

func = ... # type: _FunctionGenerator
modifier = ... # type: _FunctionGenerator

class Function(FunctionElement): ...

class _GenericMeta(VisitableType): ...
# TODO: Use GenericFunction(util.with_metaclass(_GenericMeta, Function))
class GenericFunction(_GenericMeta, Function): ...
class next_value(GenericFunction): ...

class AnsiFunction(GenericFunction): ...
class ReturnTypeFromArgs(GenericFunction): ...

class coalesce(ReturnTypeFromArgs): ...
class max(ReturnTypeFromArgs): ...
class min(ReturnTypeFromArgs): ...
class sum(ReturnTypeFromArgs): ...
class now(GenericFunction): ...
class concat(GenericFunction): ...

class char_length(GenericFunction): ...
class random(GenericFunction): ...
class count(GenericFunction): ...
class current_date(AnsiFunction): ...
class current_time(AnsiFunction): ...
class current_timestamp(AnsiFunction): ...
class current_user(AnsiFunction): ...
class localtime(AnsiFunction): ...
class localtimestamp(AnsiFunction): ...
class session_user(AnsiFunction): ...
class sysdate(AnsiFunction): ...
class user(AnsiFunction): ...
