Module sumo_internal

Main **internal** module for sumo.

Copyright © Inaka <hello@inaka.net>

Description

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

Copyright 2012 Inaka <hello@inaka.net>

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

http://www.apache.org/licenses/LICENSE-2.0

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.

Data Types

doc()

abstract datatype: doc()

field()

abstract datatype: field()

schema()

abstract datatype: schema()

Function Index

check_operator/1Checks the operator is known, throws otherwise.
doc_fields/1
doc_name/1Returns the doc name.
field_attrs/1Returns all attributes of the given field.
field_is/2True if the field has a given attribute.
field_name/1Returns the name of the given field.
field_type/1Returns the type of the given field.
get_field/2Returns the value of a field from a sumo_doc.
get_schema/1Returns the schema for a given DocName.
id_field_name/1Returns name of field marked as ID for the given schema or doc name.
id_field_type/1Returns type of field marked as ID for the given schema or doc name.
new_doc/1Returns a new doc.
new_doc/2Returns a new doc.
new_field/3Returns a new field of the given type and attributes.
new_schema/2Returns a new schema.
report_overrun/1
schema_fields/1Returns the fields of the schema.
schema_name/1Returns the name of the schema.
set_field/3Sets a value in an sumo_doc.
wakeup/1Wakes up the document.

Function Details

check_operator/1

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

Checks the operator is known, throws otherwise.

doc_fields/1

doc_fields(Doc::doc()) -> sumo:model()

doc_name/1

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

Returns the doc name

field_attrs/1

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

Returns all attributes of the given field.

field_is/2

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

True if the field has a given attribute.

field_name/1

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

Returns the name of the given field.

field_type/1

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

Returns the type of the given field.

get_field/2

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

Returns the value of a field from a sumo_doc.

get_schema/1

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

Returns the schema for a given DocName.

id_field_name/1

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

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

id_field_type/1

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

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

new_doc/1

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

Returns a new doc.

new_doc/2

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

Returns a new doc.

new_field/3

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

Returns a new field of the given type and attributes.

new_schema/2

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

Returns a new schema.

report_overrun/1

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

schema_fields/1

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

Returns the fields of the schema

schema_name/1

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

Returns the name of the schema

set_field/3

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

Sets a value in an sumo_doc.

wakeup/1

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

Wakes up the document


Generated by EDoc, Sep 29 2016, 11:57:22.