Tom Molesworth > EntityModel-Storage-PostgreSQL-0.003-TRIAL > EntityModel::Storage::PostgreSQL

Download:
EntityModel-Storage-PostgreSQL-0.003-TRIAL.tar.gz

Dependencies

Annotate this POD

Module Version: 0.003   Source  

NAME ^

EntityModel::Storage::PostgreSQL - backend storage interface for EntityModel

SYNOPSIS ^

See EntityModel.

DESCRIPTION ^

See EntityModel.

METHODS ^

setup

Open the initial database connection and set schema if provided.

apply_model

Applies the requested model to the database.

apply_model_and_schema

Given a model, apply it to the database, optionally creating the requested schema.

apply_entity

Applies this entity to the database - currently, supports creation only.

read_primary

Get the primary keys for a table.

read_fields

Read all fields for a given table.

Since this is typically a slow query, we cache the entire set of fields for all tables on the first call.

_cache_fields ^

Cache field information across all tables in the currently-selected database.

_cache_primary ^

Cache primary key information across all tables in the database.

table_list

Get a list of all the existing tables in the schema.

field_list

Returns a list of all fields for the given table.

quoted_schema_name

Returns the quoted version of the current schema.

quoted_table_name ^

Generate the quoted table identifier including any schema name if available.

quoted_field_name

Generate the quoted field identifier.

create_table_query

Create a new table.

remove_table_query ^

Query for removing the given table.

create_table ^

Create the given table.

add_field_to_table

Add the requested field to the given table, and clear related caches.

remove_table

Remove a table entirely.

read_tables

Read all table definitions from the database.

post_commit

create_schema

remove_schema ^

Remove the schema entry.

schema_exists

Returns true if the current schema exists in the database, false if not.

row_count

Reports how many rows are in the given table.

find

Find entries.

create

Creates a new instance for the given entity.

store

Update the database with current in-memory values for the given entity instance.

read

Read information for the requested entity instance.

dbh

Returns a database handle for this storage backend.

AUTHOR ^

Tom Molesworth <cpan@entitymodel.com>

LICENSE ^

Copyright Tom Molesworth 2008-2011. Licensed under the same terms as Perl itself.

syntax highlighting: