Rosetta::Utility::SQLBuilder

Generate ANSI/ISO SQL:2003 and other SQL variants
Download

Rosetta::Utility::SQLBuilder Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Darren Duncan
  • Publisher web site:
  • http://search.cpan.org/~duncand/

Rosetta::Utility::SQLBuilder Tags


Rosetta::Utility::SQLBuilder Description

Generate ANSI/ISO SQL:2003 and other SQL variants Rosetta::Utility::SQLBuilder is a reference implementation of fundamental Rosetta::Model features.The Rosetta::Utility::SQLBuilder Perl 5 module is a functional but quickly built Rosetta::Model utility class that converts a set of related Rosetta::Model Nodes into one or more SQL strings that are ready to give as input to a particular SQL relational database management system. This class will by default produce SQL that is compliant with the ANSI/ISO SQL:2003 (or 1999 or 1992) standard, which should be useable as-is with most database products. In addition, this class takes arguments that let you vary the SQL output to an alternate SQL dialect that particular database products either require or prefer for use.Rosetta::Utility::SQLBuilder is designed to implement common functionality for multiple Rosetta Engine classes (such as Rosetta::Engine::Generic) allowing them to focus more on the non-SQL specific aspects of their work. A Rosetta Engine would typically invoke this class within its prepare() implementation methods. This class can also be used by code on the application-side of a Rosetta::Interface tree (such as Rosetta::Emulator::DBI); for example, a module that emulates an older database interface which wants to return schema dumps as SQL strings ('create' statements usually) can use this module to generate those. (For your reference, see also the Rosetta::Utility::SQLParser module, which implements the inverse functionality to SQLBuilder, and is used in both of the same places.)Rosetta::Utility::SQLBuilder has no dependence on any database link products or libraries. You would, for example, use it in exactly the same way (probably) when generating SQL for an Oracle database regardless of whether the Engine is employing ODBC or SQL*Net as the pipe over which the SQL is sent. That said, it does have specific support for the DBI module's standard way of indicating run-time SQL host parameters / bind variables (using a '?' for each instance); since DBI's arguments are positional and Rosetta::Model's are named, this class will also return a map for the SQL that says what order to give the named values to DBI. Requirements: · Perl


Rosetta::Utility::SQLBuilder Related Software