Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.333.455 Times

Jifty::DBI::SchemaGenerator 0.29

  Date Added: August 11, 2010  |  Visits: 722

Jifty::DBI::SchemaGenerator

Report Broken Link
Printer Friendly Version


Product Homepage
Download (89 downloads)



Jifty::DBI::SchemaGenerator is a Perl module to generate table schemas from Jifty::DBI records. This module turns a Jifty::Record object into an SQL schema for your chosen database. At the moment, your choices are MySQL, SQLite, or PostgreSQL. Oracle might also work right, though its untested. SYNOPSIS The Short Answer See below for where we get the $handle and $model variables. use Jifty::DBI::SchemaGenerator; ... my $s_gen = Jifty::DBI::SchemaGenerator->new( $handle ); $s_gen->add_model($model); my @statements = $s_gen->create_table_sql_statements; print join("n", @statements, ); ... The Long Version See Jifty::DBI for details about the first two parts. MyModel package MyModel; # lib/MyModel.pm use warnings; use strict; use base qw(Jifty::DBI::Record); # your custom code goes here. 1; MyModel::Schema package MyModel::Schema; # lib/MyModel/Schema.pm use warnings; use strict; use Jifty::DBI::Schema; column foo => type is text; column bar => type is text; 1; myscript.pl #!/usr/bin/env perl # myscript.pl use strict; use warnings; use Jifty::DBI::SchemaGenerator; use Jifty::DBI::Handle; use MyModel; use MyModel::Schema; my $handle = Jifty::DBI::Handle->new(); $handle->connect( driver => SQLite, database => testdb, ); my $model = MyModel->new($handle); my $s_gen = Jifty::DBI::SchemaGenerator->new( $handle ); $s_gen->add_model($model); # heres the basic point of this module: my @statements = $s_gen->create_table_sql_statements; print join("n", @statements, ); # this part is directly from Jifty::Script::Schema::create_all_tables() $handle->begin_transaction; for my $statement (@statements) { my $ret = $handle->simple_query($statement); $ret or die "error creating a table: " . $ret->error_message; } $handle->commit;.

Requirements: No special requirements
Platforms: Linux
Keyword: Dbi Handle Jiftydbischemagenerator Libraries Model Mymodel Perl Perl Module Programming Schemagenerator Statements Table
Users rating: 0/10

License: Freeware Size: 99.33 KB
USER REVIEWS
More Reviews or Write Review


JIFTY::DBI::SCHEMAGENERATOR RELATED
Libraries  -  Alien Perl module 0.91
Alien Perl module package contains external libraries wrapped up for your viewing pleasure! SYNOPSIS perldoc Alien; Alien is a package that exists just to hold together an idea, the idea of Alien:: packages, so there is no code here, just...
10.24 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Network & Internet  -  MyCMS perl module 1.0
MyCMS perl module provides the MN::CMS Perl module used by the MyCMS. MyCMS perl module contains Perl object classes to manage the data of MyCMS (such as articles, links, and images). MN::CMS is a perl module that allows you to manage an...
16.38 KB  
Libraries  -  Embperl::TOC 2.2.0
Embperl::TOC is a Perl module for Embperl Documenation: Table of Contents. Embperl can be used in many ways and its documentation doesnt fit in one man pages. The following documentation is available within the distribution and the installed...
665.6 KB  
Libraries  -  Class::DBI::ConceptSearch 0.04
Class::DBI::ConceptSearch is a Perl module to retrieve Class::DBI aggregates from high-level conceptual searches. SYNOPSIS my $cs = Class::DBI::ConceptSearch->new(xml => $config); #see CONFIGURATION $cs->use_wildcards(1);...
7.17 KB  
Programming  -  Perl Module Manager 1.2.0.18
Perl Module Manager helps you to install, un-install and manage Perl modules from a CPAN site and other sources in an easy and intuitive way. Allows you to search through thousands of useful modules and libraries on a CPAN site and its mirrors....
1.44 MB  
Libraries  -  Cache::Static 0.9905
Cache::Static is a Perl module used for caching without freshness concerns. SYNOPSIS HTML::Mason instructions In handler.pl: use Cache::Static; In any component you where you have a well defined set of dependencies which change the output:...
60.42 KB  
Libraries  -  HTTPD::GroupAdmin 1.66
HTTPD::GroupAdmin is a Perl module for the management of HTTP server group databases. SYNOPSIS use HTTPD::GroupAdmin (); This software is meant to provide a generic interface that hides the inconsistencies across HTTP server implementations...
112.64 KB  
Libraries  -  Scrape::USPS::ZipLookup Perl Module 2.4
The United States Postal Service (USPS) has on its web site an HTML form at http://www.usps.com/zip4/ for standardizing an address. Given a firm, urbanization, street address, city, state, and zip, it will put the address into standard form...
11.26 KB  
Science  -  Bio::Parse::SwissProt - perl module 0.5
A Perl module that provides methods for retrieving each and every field from a standard SwissProt file.
9.61 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB