GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SQL::Translator::Parser(3) User Contributed Perl Documentation SQL::Translator::Parser(3)

SQL::Translator::Parser - describes how to write a parser

Parser modules that get invoked by SQL::Translator need to implement a single function: parse. This function will be called by the SQL::Translator instance as $class::parse($tr, $data_as_string), where $tr is a SQL::Translator instance. Other than that, the classes are free to define any helper functions, or use any design pattern internally that make the most sense.

When the parser has determined what exists, it will communicate the structure to the producer through the SQL::Translator::Schema object. This object can be retrieved from the translator (the first argument pass to parse) by calling the schema method:

  my $schema = $tr->schema;

The Schema object has methods for adding tables, fields, indices, etc. For more information, consult the docs for SQL::Translator::Schema and its related modules. For examples of how this works, examine the source code for existing SQL::Translator::Parser::* modules.

Ken Youens-Clark, <kclark@cpan.org<gt>, darren chamberlain <darren@cpan.org>.

perl(1), SQL::Translator, SQL::Translator::Schema.
2020-09-14 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.