Main **internal** module for sumo.

Main **internal** module for sumo. Use this one from your own applications.

Copyright 2012 Inaka <>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.






schema_name(Schema::schema()) -> schema_name() (see module sumo)

Returns the name of the schema

schema_fields(Schema::schema()) -> [field()]

Returns the fields of the schema

doc_name(Doc::doc()) -> atom()

Returns the doc name

doc_fields(Doc::doc()) -> doc() (see module sumo)

wakeup(Doc::doc()) -> user_doc() (see module sumo)

Wakes up the document

wakeup(DocName::module(), Doc::doc()) -> user_doc() (see module sumo)

Wakes up the document

get_store(DocName::schema_name() (see module sumo) | doc()) -> atom()

Returns the process name that handles persistence for the given Doc or DocName.

get_schema(DocName::schema_name() (see module sumo)) -> schema()

Returns the schema for a given DocName.

get_field(Name::field_name() (see module sumo), Doc::doc()) -> field_value() (see module sumo)

Returns the value of a field from a sumo_doc.

set_field(FieldName::field_name() (see module sumo), Value::field_value() (see module sumo), Doc::doc()) -> doc()

Sets a value in an sumo_doc.

id_field_name(DocName::schema_name() (see module sumo)) -> field_name() (see module sumo)

Returns name of field marked as ID for the given schema or doc name.

id_field_type(DocName::schema_name() (see module sumo)) -> field_type() (see module sumo)

Returns type of field marked as ID for the given schema or doc name.

field_name(X1::field()) -> field_name() (see module sumo)

Returns the name of the given field.

field_type(X1::field()) -> field_type() (see module sumo)

Returns the type of the given field.

field_attrs(Field::field()) -> field_attrs() (see module sumo)

Returns all attributes of the given field.

field_is(What::atom(), X2::field()) -> boolean()

True if the field has a given attribute.

new_doc(Name::schema_name() (see module sumo)) -> doc()

Returns a new doc.

new_doc(Name::schema_name() (see module sumo), Fields::doc() (see module sumo)) -> doc()

Returns a new doc.

new_schema(Name::schema_name() (see module sumo), Fields::[field()]) -> schema()

Returns a new schema.

new_field(Name::field_name() (see module sumo), Type::field_type() (see module sumo), Attributes::field_attrs() (see module sumo)) -> field()

Returns a new field of the given type and attributes.

check_operator(Op::operator() (see module sumo)) -> ok

Checks the operator is known, throws otherwise.

report_overrun(Report::term()) -> ok