trusty (3) LedgerSMB::DBObject.3pm.gz

Provided by: ledgersmb_1.3.25-1_all bug

NAME

       LedgerSMB::DBObject - 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.

       This file is licensed under the Gnu General Public License version 2, or at your option any later
       version.  A copy of the license should have been included with your software.