Module nodetree_tree_odbc [erl svg]

The module nodetree_tree_odbc is the default PubSub node tree plugin.

Copyright © 2006-2012 ProcessOne

Version: 3.0.0-alpha-5, May 23 2012 07:15:12

Behaviours: gen_pubsub_nodetree.

Authors: Christophe Romain (christophe.romain@process-one.net) [web site: http://www.process-one.net/].

Description

The module nodetree_tree_odbc is the default PubSub node tree plugin.

It is used as a default for all unknown PubSub node type. It can serve as a developer basis and reference to build its own custom pubsub node tree types.

PubSub node tree plugins are using the gen_nodetree behaviour.

The API isn't stabilized yet. The pubsub plugin development is still a work in progress. However, the system is already useable and useful as is. Please, send us comments, feedback and improvements.

Function Index

create_node/6
delete_node/2
get_node/1
get_node/2
get_node/3
get_nodes/1
get_nodes/2
get_parentnodes/3Default node tree does not handle parents, return empty list.
get_parentnodes_tree/3Default node tree does not handle parents, return a list containing just this node.
get_subnodes/2*
get_subnodes/3
get_subnodes_tree/2*
get_subnodes_tree/3
init/3Called during pubsub modules initialisation.
nodeid/2*
nodeowners/1*
options/0Returns the default pubsub node tree options.
raw_to_node/2
set_node/1
terminate/2

Function Details

create_node/6

create_node(Host, Node, Type, Owner, Options, Parents) -> ok | {error, Reason}

delete_node/2

delete_node(Host, Node) -> [node()]

get_node/1

get_node(Nidx) -> any()

get_node/2

get_node(Host, Node) -> any()

get_node/3

get_node(Host, Node, From) -> node() | {error, Reason}

get_nodes/1

get_nodes(Host) -> any()

get_nodes/2

get_nodes(Host, From) -> [node()] | {error, Reason}

get_parentnodes/3

get_parentnodes(Host, Node, From) -> [{Depth, Record}] | {error, Reason}

Default node tree does not handle parents, return empty list.

get_parentnodes_tree/3

get_parentnodes_tree(Host, Node, From) -> [{Depth, Record}] | {error, Reason}

Default node tree does not handle parents, return a list containing just this node.

get_subnodes/2 *

get_subnodes(Host, Node) -> any()

get_subnodes/3

get_subnodes(Host, Node, From) -> any()

get_subnodes_tree/2 *

get_subnodes_tree(Host, Node) -> any()

get_subnodes_tree/3

get_subnodes_tree(Host, Node::Index, From) -> [nodeidx()] | {error, Reason}

init/3

init(Host, ServerHost, Opts) -> any()

Called during pubsub modules initialisation. Any pubsub plugin must implement this function. It can return anything.

This function is mainly used to trigger the setup task necessary for the plugin. It can be used for example by the developer to create the specific module database schema if it does not exists yet.

nodeid/2 *

nodeid(Host, Node) -> any()

nodeowners/1 *

nodeowners(Nidx) -> any()

options/0

options() -> [Option]

Returns the default pubsub node tree options.

raw_to_node/2

raw_to_node(Host, X2) -> any()

set_node/1

set_node(Record::NodeRecord) -> ok | {error, Reason}

terminate/2

terminate(Host, ServerHost) -> any()


Generated by EDoc, May 23 2012, 07:15:12.