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


Manual Reference Pages  -  BIGTOP::BACKEND::SQL::DB2 (3)

.ds Aq ’

NAME

Bigtop::Backend::SQL::DB2 - backend to generate sql for DB2 database creation

CONTENTS

SYNOPSIS

If your bigtop file looks like this:



    config {
        SQL  DB2 {}
    }
    app App::Name {
    }



and there are table and/or sequence blocks in the app block, this module will make docs/schema.db2 (relative to the build_dir) when you type:



    bigtop app.bigtop SQL



or



    bigtop app.bigtop all



You can feed that file directly to any DB2 command interpreter, once you have created a database (and schema if needed).

DESCRIPTION

This is a Bigtop backend which generates SQL DB2 can understand.

KEYWORDS

This module defines no keywords. Look in Bigtop::SQL for a list of the keywords you can use in table and sequence blocks.

Note that while DB2 supports sequences, this module does not. Using them is likely to be fatal (at least to your generated SQL).

SHORTHAND for is arguments

This module does provide a couple of bits of shorthand (some aren’t so short) for the arguments of the is field statement.



    field id {
        is int4, primary_key, auto;
    }



This translates into:



    id INTEGER PRIMARY KEY NOT NULL GENERATED ALWAYS AS IDENTITY
    (START WITH 1, INCREMENT BY 1, NO CACHE)



You can also type ’assign_by_sequence’ instead of ’auto’. That might aid understanding, if you can type it correctly.

Note that using ’primary_key’ instead of the literal ’PRIMARY KEY’ is important. It tells the SQL and the Model back ends that this is the primary key, allowing foreign keys to use REFERENCES and many other nice effects.

METHODS

To keep podcoverage tests happy.
backend_block_keywords Tells tentmaker that I understand these config section backend block keywords:



    no_gen
    template



what_do_you_make Tells tentmaker what this module makes. Summary: docs/schema.db2.
gen_SQL Called by Bigtop::Parser to get me to do my thing.
setup_template Called by Bigtop::Parser so the user can substitute an alternate template for the hard coded one here.

AUTHOR

Phil Crow <crow.phil@gmail.com>

COPYRIGHT and LICENSE

Copyright (C) 2009 by Phil Crow

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.

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


perl v5.20.3 BIGTOP::BACKEND::SQL::DB2 (3) 2016-04-03

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