Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

Title:
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!
  • 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
  • Outside of code tags, you may need to use entities for some characters:
            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?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others scrutinizing the Monastery: (10)
    As of 2014-10-21 08:07 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      For retirement, I am banking on:










      Results (98 votes), past polls