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

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

Serving Software Downloads in 976 Categories, Downloaded 30.137.070 Times

DBIx::EnumConstraints 0.01

  Date Added: February 08, 2010  |  Visits: 616

DBIx::EnumConstraints

Report Broken Link
Printer Friendly Version


Product Homepage
Download (70 downloads)

DBIx::EnumConstraints is a Perl module that generates enum-like SQL constraints. SYNOPSIS use DBIx::EnumConstraints; my $ec = DBIx::EnumConstraints->new({ name => kind, fields => [ [ k1, a, b ] , [ k2, b ] ] }); # get enum field definition my $edef = $ec->enum_definition; # $edef is now kind smallint not null check (kind > 0 and kind < 2) # get constraints array my @cons = $ec->constraints; # @cons is now ( # constraint k1_has_a check (kind <> 1 or a is not null) # , constraint k1_has_b check (kind <> 1 or a is not null) # , constraint k2_has_b check (kind <> 2 or b is not null) # , constraint k2_has_no_a check (kind <> 2 or a is null)) This module generates SQL statements for enforcing enum semantics on the database columns. Enum columns is the column which can get one of 1 .. k values. For each of those values there are other columns which should or should not be null. For example in the SYNOPSIS above, when kind column is 1 the row should have both of a and b columns not null. When kind column is 2 the row should have a but no b columns. CONSTRUCTORS $class->new($args) $args should be HASH reference containing the following parameters: name The name of the enum. fields Array of arrays describing fields dependent on the enum. Each row is index is the possible value of enum minus 1 (e.g. row number 1 is for enum value 2). First item in the array is the state name. The rest of the items are field names. There is a possibility to mark optional fields by using trailing ? (e.g. b? denotes an optional b field. METHODS $self->enum_definition Returns the definition of enum column. See SYNOPSIS for example. $self->for_each_kind($callback) Runs $callback over registered enum states. For each state passes state name, fields which are in the state and fields which are out of the state. The fields are passed as ARRAY references. $self->constraints Returns the list of generated constraints. See SYNOPSIS above for an example..

Requirements: No special requirements
Platforms: Linux
Keyword: Dbix Dbixenumconstraints Enum Enumconstraints Fields Kind Libraries Null Perl Module Programming Sql Synopsis
Users rating: 0/10

License: Freeware Size: 10.24 KB
DBIX::ENUMCONSTRAINTS RELATED
Libraries  -  fields::aliased 1.05
fields::aliased is a Perl module that can create aliases for object fields. SYNOPSIS package MyPackage; use strict; use fields qw($scalar @array %hash); sub new { my $class = shift; my $self = fields::new($class); return $self; }...
8.19 KB  
Libraries  -  DBIx::XHTML_Table 1.36
DBIx::XHTML_Table is Perl module for SQL query result set to XML-based HTML table. SYNOPSIS use DBIx::XHTML_Table; # database credentials - fill in the blanks my ($data_source,$usr,$pass) = (); my $table =...
18.43 KB  
Libraries  -  DBIx::HTML::ClientDB 1.05
DBIx::HTML::ClientDB is a Perl module to convert sql into a client-side db with keyed access. Synopsis use DBIx::HTML::ClientDB; my($object) = DBIx::HTML::ClientDB -> new ( dbh => $dbh, row_headings => Unit code,Unit code,Campus name,Unit...
11.26 KB  
Libraries  -  DBIx::CGITables 0.001
DBIx::CGITables is a Perl module for easy DB access from a CGI. SYNOPSIS use DBIx::CGITables; my %parameters=(); my $query=DBIx::CGITables->new(%parameters)); $query->search_execute_and_do_everything_even_parse_the_template(); This module...
20.48 KB  
Libraries  -  DBIx::TableHash 1.05
DBIx::TableHash is a Perl module that can tie a hash to a mysql table + SQL utils. SYNOPSIS use DBIx::TableHash; my $DBHash = DBIx::TableHash->create_or_die (my $Params = { DBIDriver => mysql, Database => mydatabase, HostName =>...
17.41 KB  
Libraries  -  DBIx::SQL::Abstract 0.07
DBIx::SQL::Abstract is a Perl module that provides a convenient abstraction layer to a database. SYNOPSIS use DBIx::SQL::Abstract; my $dbh = DBIx::SQL::Abstract->new( %dbcfg ); Building SQL Abstractions. my($query, @bind) =...
4.1 KB  
Libraries  -  DBIx::FetchLoop 0.6
DBIx::FetchLoop is a Perl module that can fetch with change detection and aggregates. SYNOPSIS use DBIx::FetchLoop; $lph = DBIx::FetchLoop->new($sth, $dbi_method); $hash_ref = $lph->fetch_current_data; $rowset = $hash_ref->{previous};...
6.14 KB  
Libraries  -  DBIx::XMLMessage 0.05
DBIx::XMLMessage is a Perl module for XML Message exchange between DBI data sources. The package maintains simple XML templates that describe object structure. The package is capable of generating SQL statements based on these templates and...
25.6 KB  
Libraries  -  DBIx::Class::LibXMLdoc 0.03
DBIx::Class::LibXMLdoc is a Perl module to create an adjunct "Doc" accessor of a columns data which is automatically parsed into a LibXML documentElement (alpha-software). SYNOPSIS package My::DB::thingy; __PACKAGE__->load_components(qw/...
5.12 KB  
Libraries  -  DBIx::Class::Schema::Loader::RelBuilder 0.03007
DBIx::Class::Schema::Loader::RelBuilder is a Perl module that builds relationships for DBIx::Class::Schema::Loader. This class builds relationships for DBIx::Class::Schema::Loader. This is module is not (yet) for external use. METHODS new...
32.77 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.12.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...
2.73 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