Cubex.Base behaviour (cubex v0.2.1)

Link to this section Summary

Link to this section Types

Link to this type

api_response()

@type api_response() :: success_response() | error_response()
Link to this opaque

client()

(opaque)
@opaque client()
Link to this type

cube_client_config()

@type cube_client_config() :: [token: String.t(), url: String.t()]
Link to this type

error_response()

@type error_response() :: {:error, any()}
Link to this type

success_response()

@type success_response() :: {:ok, map()}

Link to this section Callbacks

Link to this callback

load(client, query)

@callback load(client :: client(), query :: map()) :: api_response()
Link to this callback

load(client, query, opts)

@callback load(client :: client(), query :: map(), opts :: Keyword.t()) :: api_response()
@callback meta(client :: client()) :: api_response()
Link to this callback

meta(client, opts)

@callback meta(client :: client(), opts :: Keyword.t()) :: api_response()
@callback new() :: client()
@callback new(config :: cube_client_config()) :: client()
Link to this callback

sql(client, query)

@callback sql(client :: client(), query :: map()) :: api_response()
Link to this callback

sql(client, query, opts)

@callback sql(client :: client(), query :: map(), opts :: Keyword.t()) :: api_response()