Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Fellow monks

I am the principle developer of LedgerSMB and the maintainer, currently, of everything in the PGObject space. I wanted to post my thoughts about what this is and get thoughts from the community as I look at building new components to this framework.

PGObject is an extensible object framework with close (and yet only loosely coupled) PostgreSQL integration. The namespace consists of utilities, mapper classes, and type handlers, which allow one to write code that works in an object-oriented framework, often with Moo or Moose, and where methods map often to database stored procedures. The stored procedures are then looked up by a convention set by the relevant class or role, and then methods are mapped in using the routines of the relevant mapper.

Currently I have one mapper class (and an associated Moo role) and four type handlers. The mapper class uses a simple argument name to property mapping convention with an optional "in_" at the beginning of the argument name being stripped off during the mapping process (so in_id maps to the object property of "id"). The relevant SQL to call the function (along with Windowing functions requested etc) is generated and sent to the db. When using this via Moo, you get an added ability to declare such mappings declaratively.

I am also working on another mapper class that would serialize the object to a composite type. This would allow the entire object to be passed in, creating a single SQL literal representing the entire object as a possibly nested tuple. The application for this is to pass in complex financial transactions in directly so that pre-insert checks an be run on the full set of data as a set.

Is this something that other folks would find very useful and if so, what other features should I look at adding?

In reply to PGObject Framework: Feedback? by einhverfr

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [hippo]: Which people and how long ago?
    [hippo]: It's documented in the synopsis of perlsub anyway.

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (9)
    As of 2018-05-22 10:21 GMT
    Find Nodes?
      Voting Booth?