LedgerSMB::DBObject(3pm)

LedgerSMB::DBObject3pm

Ledgersmb class for building objects from db relations

Syopsis

This module creates object instances based on LedgerSMB's in-database ORM.

Methods

new ($class, base => $LedgerSMB::hash)

This is the base constructor for all child classes. It must be used with base argument because this is necessary for database connectivity and the like.

Of course the base object can be any object that inherits LedgerSMB, so you can use any subclass of that. The per-session dbh is passed between the objects this way as is any information that is needed.

exec_method

($self, procname => $function_name, [args => \@args, schema => $schema, continue_on_error=>$continue_on_error])

Provides the basic mapping of parameters to the SQL stored procedure function arguments.

If \@args is not defined, args are mapped from the object's properties, stripping them of their in_ prefix. If schema is provided, that is used instead of PostgreSQL's search path. If continue_on_error is provided and true, the operation will not raise an exception in the event of a database error, and it will be up to the application to handle any exceptions.

__validate__ is called on every new() invocation. It is blank in this module but can be overridden in decendant modules.
_db_array_scalars(@elements) creates a db array from scalars.
_db_array_literal(@elements) creates a multiple dimension db array from preparsed db arrays or other data which does not need to be escaped.
set_ordering

Sets the ordering used by default for specific functions called by exec_method

run_custom_queries

Backward-compatible with 1.2 custom query system for moving forward.

Releases

2 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7
  2. 8

From ledgersmb 1.3.40-1 in Debian 8 (Jessie). Parsed by carta from the page's man source.