NAME

Pinwheel::Model::Base - Base class for PinWheel models

SYNOPSIS

# Given $obj which is some PinWheel model...

$obj->has_key($column_name);
$column_names = $obj->keys; # unordered array ref
$value = $obj->get($key);

$sql_param = $obj->sql_param;
@route_params = $obj->route_param;

DESCRIPTION

$bool = $obj->has_key($key)

Returns true iff $obj has a key named $key. If the column hasn't been fetched yet, has_key returns false.

$keys = $obj->keys

Return an (unordered) list of the current data keys in the model object. This only includes the columns where data has been fetched.

$value = $obj->get($key)

TODO, document me.

$sql_param = $obj->sql_param

Turns $obj into a SQL query parameter; see Model.

Default: $obj->id.

@route_params = $obj->route_param

Turns $obj into route parameter(s); see Mapper.

Default: $obj->id.

AUTHOR

A&M Network Publishing <DLAMNetPub@bbc.co.uk>