varchar
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 21
mysqlrowcopy 1.0
mysqlrowcopy is a tool that generates insert statements from result sets. more>>
mysqlrowcopy is a tool that generates insert statements from result sets. It produces output similar to what might result from running mysqldump on a single SELECT query.
This project helps eliminate some of the tedium of moving data between QA and production MySQL databases.
Build:
To build mysqlrowcopy, you should run:
./configure
make
A mysqlrowcopy and mysqlrowcopy.debug file are created. They have identical functionality, the .debug version simply has debugging symbols built in (for gdb).
Since mysqlrowcopy is probably going to be I/O bound with modest CPU and RAM usage, the only reason to even build a 64-bit version is to work around potential issues in dynamic linking 32-bit binaries against 64-bit libraries.
RECIPES
1. Migrating a MySQL user account reaper from QA server to a production server.
e.g. MySQL database server qa3.example.com to prod1.example.com:
$ mysqlrowcopy -h qa3.example.com
SELECT * FROM db WHERE User = "reaper" mysql db > reaper.sql
$ mysql -h prod1.example.com mysql < reaper.sql
You could of course simply pipe the output of mysqlrowcopy into mysql and skip the intermediate file.
(Dont forget to RELOAD PRIVILEGES afterwards)
2. Keep your test environment up to date. Populate it with production data every 24 hours. You could run this sequence from cron once a day:
$ mysqlrowcopy -h finance-db.example.com
SELECT * FROM stocks WHERE modified > DATE_SUB(NOW(),INTERVAL 24 HOUR)
finance stocks > day-stocks.sql
$ cat day-stocks.sql | mysql -h finance-test.example.com finance
3. Copy data between tables on different servers that have some similar fields.
Youve got common data in table Zip on a production database:
mysql> desc Zip;
+-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| ZIPCode | varchar(5) | | PRI | | |
| ZIPCodeType | char(1) | YES | | NULL | |
| City | varchar(32) | YES | | NULL | |
| CityType | char(1) | YES | | NULL | |
| State | varchar(32) | YES | | NULL | |
| StateCode | char(3) | YES | | NULL | |
| AreaCode | char(3) | YES | | NULL | |
| Latitude | varchar(12) | YES | | NULL | |
| Longitude | varchar(12) | YES | | NULL | |
+-------------+-------------+------+-----+---------+-------+
9 rows in set (0.00 sec)
And youve got table ZipPosition in a research database:
mysql> desc ZipPosition;
+-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| ZIPCode | varchar(5) | | | | |
| Latitude | varchar(12) | YES | | NULL | |
| Longitude | varchar(12) | YES | | NULL | |
+-------------+-------------+------+-----+---------+-------+
3 rows in set (0.00 sec)
You want to load data from production Zip into research ZipPosition.
$ mysqlrowcopy -h production SELECT ZIPCode,Latitude,Longitude common ZipPosition > pos.sql
$ cat pos.sql | mysql -h qa research
Note how we specify ZipPosition on the first line to tell mysqlrowcopy what the destination table is going to be.
<<lessThis project helps eliminate some of the tedium of moving data between QA and production MySQL databases.
Build:
To build mysqlrowcopy, you should run:
./configure
make
A mysqlrowcopy and mysqlrowcopy.debug file are created. They have identical functionality, the .debug version simply has debugging symbols built in (for gdb).
Since mysqlrowcopy is probably going to be I/O bound with modest CPU and RAM usage, the only reason to even build a 64-bit version is to work around potential issues in dynamic linking 32-bit binaries against 64-bit libraries.
RECIPES
1. Migrating a MySQL user account reaper from QA server to a production server.
e.g. MySQL database server qa3.example.com to prod1.example.com:
$ mysqlrowcopy -h qa3.example.com
SELECT * FROM db WHERE User = "reaper" mysql db > reaper.sql
$ mysql -h prod1.example.com mysql < reaper.sql
You could of course simply pipe the output of mysqlrowcopy into mysql and skip the intermediate file.
(Dont forget to RELOAD PRIVILEGES afterwards)
2. Keep your test environment up to date. Populate it with production data every 24 hours. You could run this sequence from cron once a day:
$ mysqlrowcopy -h finance-db.example.com
SELECT * FROM stocks WHERE modified > DATE_SUB(NOW(),INTERVAL 24 HOUR)
finance stocks > day-stocks.sql
$ cat day-stocks.sql | mysql -h finance-test.example.com finance
3. Copy data between tables on different servers that have some similar fields.
Youve got common data in table Zip on a production database:
mysql> desc Zip;
+-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| ZIPCode | varchar(5) | | PRI | | |
| ZIPCodeType | char(1) | YES | | NULL | |
| City | varchar(32) | YES | | NULL | |
| CityType | char(1) | YES | | NULL | |
| State | varchar(32) | YES | | NULL | |
| StateCode | char(3) | YES | | NULL | |
| AreaCode | char(3) | YES | | NULL | |
| Latitude | varchar(12) | YES | | NULL | |
| Longitude | varchar(12) | YES | | NULL | |
+-------------+-------------+------+-----+---------+-------+
9 rows in set (0.00 sec)
And youve got table ZipPosition in a research database:
mysql> desc ZipPosition;
+-------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
| ZIPCode | varchar(5) | | | | |
| Latitude | varchar(12) | YES | | NULL | |
| Longitude | varchar(12) | YES | | NULL | |
+-------------+-------------+------+-----+---------+-------+
3 rows in set (0.00 sec)
You want to load data from production Zip into research ZipPosition.
$ mysqlrowcopy -h production SELECT ZIPCode,Latitude,Longitude common ZipPosition > pos.sql
$ cat pos.sql | mysql -h qa research
Note how we specify ZipPosition on the first line to tell mysqlrowcopy what the destination table is going to be.
Download (0.021MB)
Added: 2007-03-01 License: GPL (GNU General Public License) Price:
967 downloads
wapircgw 0.1.7
wapircgw helps you easily connect to irc networks using your wap browser on your mobile phone. more>>
wapircgw helps you easily connect to irc networks using your wap browser on your mobile phone. You just need a Linux box with internet connection to act as a gateway between your mobile phone and the irc network. You can join to multiple channels and talk to others privately like when you use a real irc client.
wapircgw consists of 2 cooperative pieces: wapircphp and wapircd.
wapircd is the daemon which handles connections to irc networks and requests from your mobile phone. wapircphp generates wml webpages that you can view with your mobile phone. So youll need a web-server application with PHP and MySQL support (ex. Apache). MySQL support is needed because of the user administration and settings storage.
Example: when a user logs in with his/her mobile phone, wapircphp communicates with wapircd, requesting a new irc connection to be made. So wapircd connects to the given irc server and joins the channels which the user gave in his/her settings. When the user logs out (or does nothing for a few minutes), wapircd closes the connection with the irc server.
Installation:
Dont forget to edit wapircd password in wapircd/src/config.h!
Then run ./configure and then make. PLEASE REMEMBER: you dont have to be root to run wapircd. Its more secure to run it as a single user. Youll find the wapircd binary in the src dir after running make, but if youre lazy you can run make install as root and itll place the binary in /usr/local/bin. Run wapircd -h for further options. You dont have to have write access in the directory you start wapircd, because everything is stored in memory.
After starting wapircd, copy the contents of the wapircphp directory to your website. Add the following table to your MySQL database:
CREATE TABLE `wapirc` (
`user` varchar(20) default NULL,
`pass` varchar(20) default NULL,
`ircserver` varchar(50) default NULL,
`ircport` varchar(5) default 6667,
`ircuser` varchar(50) NOT NULL default wapirc,
`ircnick` varchar(50) default NULL,
`ircpass` varchar(20) default NULL,
`autojoin` varchar(255) default NULL,
`loglines` tinyint(3) unsigned NOT NULL default 20,
`loglineslong` tinyint(3) unsigned NOT NULL default 100,
`allowrawirccmds` tinyint(1) NOT NULL default 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Enhancements:
- Host resolving did not work under Solaris; this has been fixed.
<<lesswapircgw consists of 2 cooperative pieces: wapircphp and wapircd.
wapircd is the daemon which handles connections to irc networks and requests from your mobile phone. wapircphp generates wml webpages that you can view with your mobile phone. So youll need a web-server application with PHP and MySQL support (ex. Apache). MySQL support is needed because of the user administration and settings storage.
Example: when a user logs in with his/her mobile phone, wapircphp communicates with wapircd, requesting a new irc connection to be made. So wapircd connects to the given irc server and joins the channels which the user gave in his/her settings. When the user logs out (or does nothing for a few minutes), wapircd closes the connection with the irc server.
Installation:
Dont forget to edit wapircd password in wapircd/src/config.h!
Then run ./configure and then make. PLEASE REMEMBER: you dont have to be root to run wapircd. Its more secure to run it as a single user. Youll find the wapircd binary in the src dir after running make, but if youre lazy you can run make install as root and itll place the binary in /usr/local/bin. Run wapircd -h for further options. You dont have to have write access in the directory you start wapircd, because everything is stored in memory.
After starting wapircd, copy the contents of the wapircphp directory to your website. Add the following table to your MySQL database:
CREATE TABLE `wapirc` (
`user` varchar(20) default NULL,
`pass` varchar(20) default NULL,
`ircserver` varchar(50) default NULL,
`ircport` varchar(5) default 6667,
`ircuser` varchar(50) NOT NULL default wapirc,
`ircnick` varchar(50) default NULL,
`ircpass` varchar(20) default NULL,
`autojoin` varchar(255) default NULL,
`loglines` tinyint(3) unsigned NOT NULL default 20,
`loglineslong` tinyint(3) unsigned NOT NULL default 100,
`allowrawirccmds` tinyint(1) NOT NULL default 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Enhancements:
- Host resolving did not work under Solaris; this has been fixed.
Download (0.086MB)
Added: 2006-04-27 License: GPL (GNU General Public License) Price:
1277 downloads
nsFB 1.2
nsFB is an internal AOLserver database driver for the Firebird or Interbase database. more>>
nsFB is an internal AOLserver database driver for the Firebird or Interbase database. It supports reading and writing BLOB data and ARRAY data.
nsFB project supports the full size of varchar (32765 bytes) or char (32767 bytes). Many configuration options are supported, such as charset, dialect, transaction isolation level, etc. All kinds of data types are supported, such as NUMERIC or DECIMAL
Enhancements:
- This release adds support for importing a file into a BLOB and writing a BLOB into a file.
- Hexadecimal or base 64 string representations of data can be read from or written to the database.
<<lessnsFB project supports the full size of varchar (32765 bytes) or char (32767 bytes). Many configuration options are supported, such as charset, dialect, transaction isolation level, etc. All kinds of data types are supported, such as NUMERIC or DECIMAL
Enhancements:
- This release adds support for importing a file into a BLOB and writing a BLOB into a file.
- Hexadecimal or base 64 string representations of data can be read from or written to the database.
Download (0.022MB)
Added: 2006-10-24 License: LGPL (GNU Lesser General Public License) Price:
1097 downloads
JDBC 0.01
JDBC is a Perl 5 interface to Java JDBC (via Inline::Java). more>>
JDBC is a Perl 5 interface to Java JDBC (via Inline::Java).
SYNOPSIS
use JDBC;
JDBC->load_driver("org.apache.derby.jdbc.EmbeddedDriver");
my $con = JDBC->getConnection($url, "test", "test");
my $s = $con->createStatement();
$s->executeUpdate("create table foo (foo int, bar varchar(200), primary key (foo))");
$s->executeUpdate("insert into foo (foo, bar) values (42,notthis)");
$s->executeUpdate("insert into foo (foo, bar) values (43,notthat)");
my $rs = $s->executeQuery("select foo, bar from foo");
while ($rs->next) {
my $foo = $rs->getInt(1);
my $bar = $rs->getString(2);
print "row: foo=$foo, bar=$barn";
}
This JDBC module provides an interface to the Java java.sql.* and javax.sql.* JDBC APIs.
<<lessSYNOPSIS
use JDBC;
JDBC->load_driver("org.apache.derby.jdbc.EmbeddedDriver");
my $con = JDBC->getConnection($url, "test", "test");
my $s = $con->createStatement();
$s->executeUpdate("create table foo (foo int, bar varchar(200), primary key (foo))");
$s->executeUpdate("insert into foo (foo, bar) values (42,notthis)");
$s->executeUpdate("insert into foo (foo, bar) values (43,notthat)");
my $rs = $s->executeQuery("select foo, bar from foo");
while ($rs->next) {
my $foo = $rs->getInt(1);
my $bar = $rs->getString(2);
print "row: foo=$foo, bar=$barn";
}
This JDBC module provides an interface to the Java java.sql.* and javax.sql.* JDBC APIs.
Download (1.9MB)
Added: 2007-06-04 License: Perl Artistic License Price:
874 downloads
Persistent::MySQL 0.50
Persistent::MySQL is a persistent class implemented using a MySQL database. more>>
Persistent::MySQL is a persistent class implemented using a MySQL database.
SYNOPSIS
use Persistent::MySQL;
use English; # import readable variable names like $EVAL_ERROR
eval { ### in case an exception is thrown ###
### allocate a persistent object ###
my $emp = new Persistent::MySQL($data_source, $username, $password, $table);
### define attributes of the object ###
$emp->add_attribute(empno, ID, Number, undef, 4);
$emp->add_attribute(ename, Persistent, VarChar, undef, 10);
$emp->add_attribute(job, Persistent, VarChar, undef, 9);
$emp->add_attribute(mgr, Persistent, Number, undef, 4);
$emp->add_attribute(hiredate, Persistent, DateTime, undef);
$emp->add_attribute(sal, Persistent, Number, undef, 7, 2);
$emp->add_attribute(comm, Persistent, Number, undef, 7, 2);
$emp->add_attribute(deptno, Persistent, Number, undef, 2);
### query the datastore for some objects ###
$emp->restore_where(qq{
sal > 1000 and
job = CLERK and
ename LIKE M%
}, "sal, ename");
while ($emp->restore_next()) {
printf "ename = %s, emp# = %s, sal = %s, hiredate = %sn",
$emp->ename, $emp->empno, $emp->sal, $emp->hiredate;
}
};
if ($EVAL_ERROR) { ### catch those exceptions! ###
print "An error occurred: $EVAL_ERRORn";
}
ABSTRACT
This is a Persistent class that uses a MySQL database table to store and retrieve objects. This class can be instantiated directly or subclassed. The methods described below are unique to this class, and all other methods that are provided by this class are documented in the Persistent documentation. The Persistent documentation has a very thorough introduction to using the Persistent framework of classes.
<<lessSYNOPSIS
use Persistent::MySQL;
use English; # import readable variable names like $EVAL_ERROR
eval { ### in case an exception is thrown ###
### allocate a persistent object ###
my $emp = new Persistent::MySQL($data_source, $username, $password, $table);
### define attributes of the object ###
$emp->add_attribute(empno, ID, Number, undef, 4);
$emp->add_attribute(ename, Persistent, VarChar, undef, 10);
$emp->add_attribute(job, Persistent, VarChar, undef, 9);
$emp->add_attribute(mgr, Persistent, Number, undef, 4);
$emp->add_attribute(hiredate, Persistent, DateTime, undef);
$emp->add_attribute(sal, Persistent, Number, undef, 7, 2);
$emp->add_attribute(comm, Persistent, Number, undef, 7, 2);
$emp->add_attribute(deptno, Persistent, Number, undef, 2);
### query the datastore for some objects ###
$emp->restore_where(qq{
sal > 1000 and
job = CLERK and
ename LIKE M%
}, "sal, ename");
while ($emp->restore_next()) {
printf "ename = %s, emp# = %s, sal = %s, hiredate = %sn",
$emp->ename, $emp->empno, $emp->sal, $emp->hiredate;
}
};
if ($EVAL_ERROR) { ### catch those exceptions! ###
print "An error occurred: $EVAL_ERRORn";
}
ABSTRACT
This is a Persistent class that uses a MySQL database table to store and retrieve objects. This class can be instantiated directly or subclassed. The methods described below are unique to this class, and all other methods that are provided by this class are documented in the Persistent documentation. The Persistent documentation has a very thorough introduction to using the Persistent framework of classes.
Download (0.010MB)
Added: 2007-05-19 License: Perl Artistic License Price:
888 downloads
Persistent::Oracle 0.50
Persistent::Oracle is a persistent class implemented using an Oracle database. more>>
Persistent::Oracle is a persistent class implemented using an Oracle database.
SYNOPSIS
use Persistent::Oracle;
use English; # import readable variable names like $EVAL_ERROR
eval { ### in case an exception is thrown ###
### allocate a persistent object ###
my $emp = new Persistent::Oracle(dbi:Oracle:ORCL,
scott, tiger, emp);
### define attributes of the object ###
$emp->add_attribute(empno, ID, Number, undef, 4);
$emp->add_attribute(ename, Persistent, VarChar, undef, 10);
$emp->add_attribute(job, Persistent, VarChar, undef, 9);
$emp->add_attribute(mgr, Persistent, Number, undef, 4);
$emp->add_attribute(hiredate, Persistent, DateTime, undef);
$emp->add_attribute(sal, Persistent, Number, undef, 7, 2);
$emp->add_attribute(comm, Persistent, Number, undef, 7, 2);
$emp->add_attribute(deptno, Persistent, Number, undef, 2);
### query the datastore for some objects ###
$emp->restore_where(qq{
sal > 1000 and
job = CLERK and
ename LIKE M%
}, "sal, ename");
while ($emp->restore_next()) {
printf "ename = %s, emp# = %s, sal = %s, hiredate = %sn",
$emp->ename, $emp->empno, $emp->sal, $emp->hiredate;
}
};
if ($EVAL_ERROR) { ### catch those exceptions! ###
print "An error occurred: $EVAL_ERRORn";
}
ABSTRACT
This is a Persistent class that uses an Oracle database table to store and retrieve objects. This class can be instantiated directly or subclassed. The methods described below are unique to this class, and all other methods that are provided by this class are documented in the Persistent documentation. The Persistent documentation has a very thorough introduction to using the Persistent framework of classes.
<<lessSYNOPSIS
use Persistent::Oracle;
use English; # import readable variable names like $EVAL_ERROR
eval { ### in case an exception is thrown ###
### allocate a persistent object ###
my $emp = new Persistent::Oracle(dbi:Oracle:ORCL,
scott, tiger, emp);
### define attributes of the object ###
$emp->add_attribute(empno, ID, Number, undef, 4);
$emp->add_attribute(ename, Persistent, VarChar, undef, 10);
$emp->add_attribute(job, Persistent, VarChar, undef, 9);
$emp->add_attribute(mgr, Persistent, Number, undef, 4);
$emp->add_attribute(hiredate, Persistent, DateTime, undef);
$emp->add_attribute(sal, Persistent, Number, undef, 7, 2);
$emp->add_attribute(comm, Persistent, Number, undef, 7, 2);
$emp->add_attribute(deptno, Persistent, Number, undef, 2);
### query the datastore for some objects ###
$emp->restore_where(qq{
sal > 1000 and
job = CLERK and
ename LIKE M%
}, "sal, ename");
while ($emp->restore_next()) {
printf "ename = %s, emp# = %s, sal = %s, hiredate = %sn",
$emp->ename, $emp->empno, $emp->sal, $emp->hiredate;
}
};
if ($EVAL_ERROR) { ### catch those exceptions! ###
print "An error occurred: $EVAL_ERRORn";
}
ABSTRACT
This is a Persistent class that uses an Oracle database table to store and retrieve objects. This class can be instantiated directly or subclassed. The methods described below are unique to this class, and all other methods that are provided by this class are documented in the Persistent documentation. The Persistent documentation has a very thorough introduction to using the Persistent framework of classes.
Download (0.011MB)
Added: 2007-05-19 License: Perl Artistic License Price:
889 downloads
Persistent::Sybase 0.50
Persistent::Sybase is a persistent class implemented using a Sybase database. more>>
Persistent::Sybase is a persistent class implemented using a Sybase database.
SYNOPSIS
use Persistent::Sybase;
use English; # import readable variable names like $EVAL_ERROR
eval { ### in case an exception is thrown ###
### allocate a persistent object ###
my $emp = new Persistent::Sybase($data_source, $username, $password, $table);
### define attributes of the object ###
$emp->add_attribute(empno, ID, Number, undef, 4);
$emp->add_attribute(ename, Persistent, VarChar, undef, 10);
$emp->add_attribute(job, Persistent, VarChar, undef, 9);
$emp->add_attribute(mgr, Persistent, Number, undef, 4);
$emp->add_attribute(hiredate, Persistent, DateTime, undef);
$emp->add_attribute(sal, Persistent, Number, undef, 7, 2);
$emp->add_attribute(comm, Persistent, Number, undef, 7, 2);
$emp->add_attribute(deptno, Persistent, Number, undef, 2);
### query the datastore for some objects ###
$emp->restore_where(qq{
sal > 1000 and
job = CLERK and
ename LIKE M%
}, "sal, ename");
while ($emp->restore_next()) {
printf "ename = %s, emp# = %s, sal = %s, hiredate = %sn",
$emp->ename, $emp->empno, $emp->sal, $emp->hiredate;
}
};
if ($EVAL_ERROR) { ### catch those exceptions! ###
print "An error occurred: $EVAL_ERRORn";
}
ABSTRACT
This is a Persistent class that uses a Sybase database table to store and retrieve objects. This class can be instantiated directly or subclassed. The methods described below are unique to this class, and all other methods that are provided by this class are documented in the Persistent documentation. The Persistent documentation has a very thorough introduction to using the Persistent framework of classes.
<<lessSYNOPSIS
use Persistent::Sybase;
use English; # import readable variable names like $EVAL_ERROR
eval { ### in case an exception is thrown ###
### allocate a persistent object ###
my $emp = new Persistent::Sybase($data_source, $username, $password, $table);
### define attributes of the object ###
$emp->add_attribute(empno, ID, Number, undef, 4);
$emp->add_attribute(ename, Persistent, VarChar, undef, 10);
$emp->add_attribute(job, Persistent, VarChar, undef, 9);
$emp->add_attribute(mgr, Persistent, Number, undef, 4);
$emp->add_attribute(hiredate, Persistent, DateTime, undef);
$emp->add_attribute(sal, Persistent, Number, undef, 7, 2);
$emp->add_attribute(comm, Persistent, Number, undef, 7, 2);
$emp->add_attribute(deptno, Persistent, Number, undef, 2);
### query the datastore for some objects ###
$emp->restore_where(qq{
sal > 1000 and
job = CLERK and
ename LIKE M%
}, "sal, ename");
while ($emp->restore_next()) {
printf "ename = %s, emp# = %s, sal = %s, hiredate = %sn",
$emp->ename, $emp->empno, $emp->sal, $emp->hiredate;
}
};
if ($EVAL_ERROR) { ### catch those exceptions! ###
print "An error occurred: $EVAL_ERRORn";
}
ABSTRACT
This is a Persistent class that uses a Sybase database table to store and retrieve objects. This class can be instantiated directly or subclassed. The methods described below are unique to this class, and all other methods that are provided by this class are documented in the Persistent documentation. The Persistent documentation has a very thorough introduction to using the Persistent framework of classes.
Download (0.010MB)
Added: 2007-05-22 License: Perl Artistic License Price:
886 downloads
Persistent::mSQL 0.50
Persistent::mSQL is a persistent class implemented using a mSQL database. more>>
Persistent::mSQL is a persistent class implemented using a mSQL database.
SYNOPSIS
use Persistent::mSQL;
use English; # import readable variable names like $EVAL_ERROR
eval { ### in case an exception is thrown ###
### allocate a persistent object ###
my $emp = new Persistent::mSQL($data_source, undef, undef, $table);
### define attributes of the object ###
$emp->add_attribute(empno, ID, Number, undef, 4);
$emp->add_attribute(ename, Persistent, VarChar, undef, 10);
$emp->add_attribute(job, Persistent, VarChar, undef, 9);
$emp->add_attribute(mgr, Persistent, Number, undef, 4);
$emp->add_attribute(hiredate, Persistent, DateTime, undef);
$emp->add_attribute(sal, Persistent, Number, undef, 7, 2);
$emp->add_attribute(comm, Persistent, Number, undef, 7, 2);
$emp->add_attribute(deptno, Persistent, Number, undef, 2);
### query the datastore for some objects ###
$emp->restore_where(qq{
sal > 1000 and
job = CLERK and
ename LIKE M%
}, "sal, ename");
while ($emp->restore_next()) {
printf "ename = %s, emp# = %s, sal = %s, hiredate = %sn",
$emp->ename, $emp->empno, $emp->sal, $emp->hiredate;
}
};
if ($EVAL_ERROR) { ### catch those exceptions! ###
print "An error occurred: $EVAL_ERRORn";
}
ABSTRACT
This is a Persistent class that uses a mSQL database table to store and retrieve objects. This class can be instantiated directly or subclassed. The methods described below are unique to this class, and all other methods that are provided by this class are documented in the Persistent documentation. The Persistent documentation has a very thorough introduction to using the Persistent framework of classes.
<<lessSYNOPSIS
use Persistent::mSQL;
use English; # import readable variable names like $EVAL_ERROR
eval { ### in case an exception is thrown ###
### allocate a persistent object ###
my $emp = new Persistent::mSQL($data_source, undef, undef, $table);
### define attributes of the object ###
$emp->add_attribute(empno, ID, Number, undef, 4);
$emp->add_attribute(ename, Persistent, VarChar, undef, 10);
$emp->add_attribute(job, Persistent, VarChar, undef, 9);
$emp->add_attribute(mgr, Persistent, Number, undef, 4);
$emp->add_attribute(hiredate, Persistent, DateTime, undef);
$emp->add_attribute(sal, Persistent, Number, undef, 7, 2);
$emp->add_attribute(comm, Persistent, Number, undef, 7, 2);
$emp->add_attribute(deptno, Persistent, Number, undef, 2);
### query the datastore for some objects ###
$emp->restore_where(qq{
sal > 1000 and
job = CLERK and
ename LIKE M%
}, "sal, ename");
while ($emp->restore_next()) {
printf "ename = %s, emp# = %s, sal = %s, hiredate = %sn",
$emp->ename, $emp->empno, $emp->sal, $emp->hiredate;
}
};
if ($EVAL_ERROR) { ### catch those exceptions! ###
print "An error occurred: $EVAL_ERRORn";
}
ABSTRACT
This is a Persistent class that uses a mSQL database table to store and retrieve objects. This class can be instantiated directly or subclassed. The methods described below are unique to this class, and all other methods that are provided by this class are documented in the Persistent documentation. The Persistent documentation has a very thorough introduction to using the Persistent framework of classes.
Download (0.010MB)
Added: 2007-05-22 License: Perl Artistic License Price:
885 downloads
PHP News Ticker 0.0.1
PHP News Ticker is a news ticker that is easy to manage, easy to add to, and easy to purge old news from. more>>
PHP News Ticker is a news ticker that is easy to manage, easy to add to, and easy to purge old news from. PHP News Ticker project allows HTML and small images to be inserted. Its a horizontal scroller, so it does not display big pictures attractively.
***first, go through the admin/config.php
and change the following:
host, dbuser, dbpass, dbname
***create a table on a db with the following colums:
id (int)6 AUTO INCREMENT NOT NULL PRIMARY KEY
message (VARCHAR)9000 NOT NUL
*** copy and paste from the sample_script.php what you need, changing what has been annotated to be changed.
*** upload files to http://"your-site.com"/news leaving the folder structure unchanged
*** Log into the admin area to test script by going to http://"your-site.com"/news/admin no username needed, just the password that you setup in the config.php file.
<<less***first, go through the admin/config.php
and change the following:
host, dbuser, dbpass, dbname
***create a table on a db with the following colums:
id (int)6 AUTO INCREMENT NOT NULL PRIMARY KEY
message (VARCHAR)9000 NOT NUL
*** copy and paste from the sample_script.php what you need, changing what has been annotated to be changed.
*** upload files to http://"your-site.com"/news leaving the folder structure unchanged
*** Log into the admin area to test script by going to http://"your-site.com"/news/admin no username needed, just the password that you setup in the config.php file.
Download (0.008MB)
Added: 2007-01-24 License: GPL (GNU General Public License) Price:
1003 downloads
Skeleton Engine for MySQL 0.4
Skeleton Engine for MySQL is a full framework to plug in a new storage engine. more>>
Skeleton Engine for MySQL is a full framework to plug in a new storage engine. Comes with prebuild autoconf files, and a full framework to plug in your own design.
The AWS, HTTP, Memcache, Nitro, PBXT, and many other engines were put together from the skeleton engine.
To install, grab a copy of the mysql source code and run this:
./configure --with-mysql=/home/brian/mysql-5.1/ --libdir=/usr/local/lib/mysql/
make install
And then inside of MySQL:
mysql> INSTALL PLUGIN skeleton SONAME libskeleton_engine.so;
mysql> CREATE TABLE `d` (`a` varchar(125), b text, primary key(a)) ENGINE=skeleton DEFAULT
CHARSET=latin1;
Query OK, 0 rows affected (0.01 sec)
You will probably need to edit the Makefile.am in the src/ tree if you want to build on anything other then Linux (and the Makefile assumes that the server was not compiled for debug).
<<lessThe AWS, HTTP, Memcache, Nitro, PBXT, and many other engines were put together from the skeleton engine.
To install, grab a copy of the mysql source code and run this:
./configure --with-mysql=/home/brian/mysql-5.1/ --libdir=/usr/local/lib/mysql/
make install
And then inside of MySQL:
mysql> INSTALL PLUGIN skeleton SONAME libskeleton_engine.so;
mysql> CREATE TABLE `d` (`a` varchar(125), b text, primary key(a)) ENGINE=skeleton DEFAULT
CHARSET=latin1;
Query OK, 0 rows affected (0.01 sec)
You will probably need to edit the Makefile.am in the src/ tree if you want to build on anything other then Linux (and the Makefile assumes that the server was not compiled for debug).
Download (0.29MB)
Added: 2007-07-17 License: BSD License Price:
831 downloads
HTML::Widgets::Index 0.6
HTML::Widgets::Index is a Perl module for creating web indexes and menus. more>>
HTML::Widgets::Index is a Perl module for creating web indexes and menus.
This module renders the index of a document tree using the data stored in a MySQL database generated by anxova. It has a flexible set of render options that gives the webmaster many options on the menu item layout.
Table
The tree data must be in a table in a database. The fields of this table should be:
id: int identifies the entry
uri: varchar(150) link of the entry
text: varchar(150) text displayed in the screen
id_parent: int the parent of the current entry. The root is 0
ordern: int menu item position on the menu
Data
Say you have a document tree like this:
a
a1.html
a2.html
b
b1.html
b2
b21.html
b22.html
b3.html
c
c1.html
Then you must enter this in the table :
; First the directory A
INSERT INTO index_items (id,id_parent,uri,text)
VALUES (1,0,a,dir A);
; Now the docs of the a dir
INSERT INTO index_items (id,id_parent,uri,text)
VALUES (2,1,a1.html,A first);
INSERT INTO index_items (id,id_parent,uri,text)
VALUES (3,1,a2.html,A 2nd);
; Now the directory B INSERT INTO index_items (id,id_parent,uri,text) VALUES (4,0,b,dir B); INSERT INTO index_items (id,id_parent,uri,text) VALUES (5,4,b1.html,B first);
; The directory B has subdirs INSERT INTO index_items (id,id_parent,uri,text) VALUES (6,4,b2,B second section);
INSERT INTO index_items (id,id_parent,uri,text)
VALUES (7,6,b21.html,B 2 1 doc);
Notice the uri field is relative, not absolute. You dont need to specify all the path to a document. So you can move docs in the directory, then just change the parent in the table.
The items are sorted alphabetically, if you want to change the order displayed in the html, just add the field ordern when you do the insert:
INSERT INTO index_items (id,id_parent,uri,text,ordern)
VALUES (5,4,b1.html,B first,2);
INSERT INTO index_items (id,id_parent,uri,text)
VALUES (6,4,b2,B second section,1);
<<lessThis module renders the index of a document tree using the data stored in a MySQL database generated by anxova. It has a flexible set of render options that gives the webmaster many options on the menu item layout.
Table
The tree data must be in a table in a database. The fields of this table should be:
id: int identifies the entry
uri: varchar(150) link of the entry
text: varchar(150) text displayed in the screen
id_parent: int the parent of the current entry. The root is 0
ordern: int menu item position on the menu
Data
Say you have a document tree like this:
a
a1.html
a2.html
b
b1.html
b2
b21.html
b22.html
b3.html
c
c1.html
Then you must enter this in the table :
; First the directory A
INSERT INTO index_items (id,id_parent,uri,text)
VALUES (1,0,a,dir A);
; Now the docs of the a dir
INSERT INTO index_items (id,id_parent,uri,text)
VALUES (2,1,a1.html,A first);
INSERT INTO index_items (id,id_parent,uri,text)
VALUES (3,1,a2.html,A 2nd);
; Now the directory B INSERT INTO index_items (id,id_parent,uri,text) VALUES (4,0,b,dir B); INSERT INTO index_items (id,id_parent,uri,text) VALUES (5,4,b1.html,B first);
; The directory B has subdirs INSERT INTO index_items (id,id_parent,uri,text) VALUES (6,4,b2,B second section);
INSERT INTO index_items (id,id_parent,uri,text)
VALUES (7,6,b21.html,B 2 1 doc);
Notice the uri field is relative, not absolute. You dont need to specify all the path to a document. So you can move docs in the directory, then just change the parent in the table.
The items are sorted alphabetically, if you want to change the order displayed in the html, just add the field ordern when you do the insert:
INSERT INTO index_items (id,id_parent,uri,text,ordern)
VALUES (5,4,b1.html,B first,2);
INSERT INTO index_items (id,id_parent,uri,text)
VALUES (6,4,b2,B second section,1);
Download (0.064MB)
Added: 2007-08-15 License: Perl Artistic License Price:
800 downloads
Data::Type 0.01.04
Data::Type is a Perl module with versatile data and value types. more>>
Data::Type is a Perl module with versatile data and value types.
SYNOPSIS
use Data::Type qw(:all);
use Error qw(:try);
try
{
verify $email , EMAIL;
verify $homepage , URI(http);
verify $cc , CREDITCARD( MASTERCARD, VISA );
verify $answer_a , YESNO;
verify $gender , GENDER;
verify one , ENUM( qw(one two three) );
verify [qw(two six)], SET( qw(one two three four five six) ) );
verify $server_ip4 , IP(v4);
verify $server_ip6 , IP(v6);
verify A35231AH1 , CINS;
verify 14565935 , ISSN;
verify DE , LANGCODE;
verify German , LANGNAME;
verify 012345678905, UPC();
verify 5276440065421319, CREDITCARD( MASTERCARD ) );
verify ATGCAAAT , BIO::DNA;
verify AUGGGAAAU , BIO::RNA;
verify 01001001110110101, BINARY;
verify 0F 0C 0A, HEX;
verify 0 , DEFINED;
verify 234 , NUM( 20 );
verify 1 , BOOL( true );
verify 100 , INT;
verify 1.1 , REAL;
my $foo = bless( 123, SomeThing );
verify $foo , REF;
verify $foo , REF( qw(SomeThing Else) );
verify [ bar ] , REF( ARRAY );
verify x 20 , VARCHAR( 20 );
verify 2001-01-01 , DATE( MYSQL );
verify 16 Nov 94 22:28:20 PST , DATE( DATEPARSE );
verify 9999-12-31 23:59:59, DATETIME;
verify 1970-01-01 00:00:00, TIMESTAMP;
verify -838:59:59 , TIME;
verify 2155 , YEAR;
verify 69 , YEAR(2);
verify 0 x 20 , TINYTEXT;
verify 0 x 20 , MEDIUMTEXT;
verify 0 x 20 , LONGTEXT;
verify 0 x 20 , TEXT;
verify 80 , PORT;
verify www.cpan.org, DOMAIN;
}
catch Type::Exception with
{
my $e = shift;
printf "Expected %s %s at %s line %sn",
$e->value,
$e->type->info,
$e->was_file,
$e->was_line;
foreach my $entry ( testplan( $e->type ) )
{
printf "texpecting it %s %s ", $entry->[1] ? is : is NOT, $entry->[0]->info();
}
};
# believe it or not, this really works
foreach ( EMAIL, WORD, CREDITCARD( MASTERCARD, VISA ), BIO::DNA, HEX )
{
print $_->info;
print $_->usage;
print $_->export; # does it have other names
print $_->param; # what are my choice i.e. [yes,no]
print $_->isa( IType::Business ); # is it a Business related type ?
print $_->VERSION; # first apperance in Data::Type release
}
# tied interface (alias typ)
try
{
typ ENUM( qw(DNA RNA) ), ( my $a, my $b );
print "a is typed" if istyp( $a );
$a = DNA; # $alias only accepts DNA or RNA
$a = RNA;
$a = xNA; # throws exception
untyp( $alias );
}
catch Type::Exception ::with
{
printf "Expected %s %s at %s line %sn",
$e->value,
$e->type->info,
$e->was_file,
$e->was_line;
};
dverify( $email, EMAIL ) or die $!;
my $g = Data::Type::Guard->new(
allow => [ Human, Others ], # blessed objects of that type
tests =>
{
email => EMAIL( 1 ), # mxcheck ON ! see Email::Valid
firstname => WORD,
social_id => [ NUM, VARCHAR( 10 ) ],
contacts => sub { my %args = @_; exists $args{lucy} },
}
);
$g->inspect( $h );
# compact version
overify { email => EMAIL( 1 ), firstname => WORD }, $object_a, $object_b;
print toc();
print catalog();
This module supports versatile data and value types. Out of the ordinary it supports parameterised types (like databases have i.e. VARCHAR(80) ). When you try to feed a typed variable against some odd data, this module explains what he would have expected.
<<lessSYNOPSIS
use Data::Type qw(:all);
use Error qw(:try);
try
{
verify $email , EMAIL;
verify $homepage , URI(http);
verify $cc , CREDITCARD( MASTERCARD, VISA );
verify $answer_a , YESNO;
verify $gender , GENDER;
verify one , ENUM( qw(one two three) );
verify [qw(two six)], SET( qw(one two three four five six) ) );
verify $server_ip4 , IP(v4);
verify $server_ip6 , IP(v6);
verify A35231AH1 , CINS;
verify 14565935 , ISSN;
verify DE , LANGCODE;
verify German , LANGNAME;
verify 012345678905, UPC();
verify 5276440065421319, CREDITCARD( MASTERCARD ) );
verify ATGCAAAT , BIO::DNA;
verify AUGGGAAAU , BIO::RNA;
verify 01001001110110101, BINARY;
verify 0F 0C 0A, HEX;
verify 0 , DEFINED;
verify 234 , NUM( 20 );
verify 1 , BOOL( true );
verify 100 , INT;
verify 1.1 , REAL;
my $foo = bless( 123, SomeThing );
verify $foo , REF;
verify $foo , REF( qw(SomeThing Else) );
verify [ bar ] , REF( ARRAY );
verify x 20 , VARCHAR( 20 );
verify 2001-01-01 , DATE( MYSQL );
verify 16 Nov 94 22:28:20 PST , DATE( DATEPARSE );
verify 9999-12-31 23:59:59, DATETIME;
verify 1970-01-01 00:00:00, TIMESTAMP;
verify -838:59:59 , TIME;
verify 2155 , YEAR;
verify 69 , YEAR(2);
verify 0 x 20 , TINYTEXT;
verify 0 x 20 , MEDIUMTEXT;
verify 0 x 20 , LONGTEXT;
verify 0 x 20 , TEXT;
verify 80 , PORT;
verify www.cpan.org, DOMAIN;
}
catch Type::Exception with
{
my $e = shift;
printf "Expected %s %s at %s line %sn",
$e->value,
$e->type->info,
$e->was_file,
$e->was_line;
foreach my $entry ( testplan( $e->type ) )
{
printf "texpecting it %s %s ", $entry->[1] ? is : is NOT, $entry->[0]->info();
}
};
# believe it or not, this really works
foreach ( EMAIL, WORD, CREDITCARD( MASTERCARD, VISA ), BIO::DNA, HEX )
{
print $_->info;
print $_->usage;
print $_->export; # does it have other names
print $_->param; # what are my choice i.e. [yes,no]
print $_->isa( IType::Business ); # is it a Business related type ?
print $_->VERSION; # first apperance in Data::Type release
}
# tied interface (alias typ)
try
{
typ ENUM( qw(DNA RNA) ), ( my $a, my $b );
print "a is typed" if istyp( $a );
$a = DNA; # $alias only accepts DNA or RNA
$a = RNA;
$a = xNA; # throws exception
untyp( $alias );
}
catch Type::Exception ::with
{
printf "Expected %s %s at %s line %sn",
$e->value,
$e->type->info,
$e->was_file,
$e->was_line;
};
dverify( $email, EMAIL ) or die $!;
my $g = Data::Type::Guard->new(
allow => [ Human, Others ], # blessed objects of that type
tests =>
{
email => EMAIL( 1 ), # mxcheck ON ! see Email::Valid
firstname => WORD,
social_id => [ NUM, VARCHAR( 10 ) ],
contacts => sub { my %args = @_; exists $args{lucy} },
}
);
$g->inspect( $h );
# compact version
overify { email => EMAIL( 1 ), firstname => WORD }, $object_a, $object_b;
print toc();
print catalog();
This module supports versatile data and value types. Out of the ordinary it supports parameterised types (like databases have i.e. VARCHAR(80) ). When you try to feed a typed variable against some odd data, this module explains what he would have expected.
Download (0.022MB)
Added: 2006-10-02 License: Perl Artistic License Price:
1117 downloads
dim_STAT 8.3
A performance analysis and monitoring tool for Solaris and Linux more>>
dim_STAT 8.3 is yet another excellent utility you should not miss. It is actually a performance analysis and monitoring tool for Solaris and Linux (as well all other UNIX) systems.
Major Features:
- Web based interface
- Data storage in a SQL database
- Several data views
- Interactive (Java) or static (PNG) graphs
- Real-time monitoring
- Multi-host monitoring
- Post analyzing
- Statistics integration
- Professional reporting with automated features, and more.
Enhancements: Jul.2009
- Fixes :
-
- security issue on STAT-service!!
- execution dim_STAT CLI from the web services
- fixed LANG=C and LC_ALL=C via the main STAT-service script
- Improvements :
-
- Optional Admin password may be given on a database creation and then it'll be required for any admin action!
- Database error messages are now handled separately from LOG messages
- Java WebDRAW Applet updated
- add color LEDs near hostnames to signal running or stopped hosts
- add #Records column to have an idea about a number of database rows per collect
- Admin LOG management is working more friendly now with a long lists of messages
- STAT-service daemon may listen exclusively on a given IP address now [IP:port]
- Whole database backup is added to the Admin menu
- Database schema :
-
- iostat disk names are moved to varchar(64)
- all float values are moved to float(25,5) to have an easily human reading
- Add-On name limit is 14 characters now
- Report Tool :
-
- wiki-like syntax is added to simplify writing!
- look & feel updated
- some minor fixes here & there
- EasySTAT additional options :
-
- COMPRESS=gzip (to automatically compress each output file)
- TIMER=yes (automatically adding timestamps and sync tags within output files)
- New Add-Ons :
-
- HAR v2 (CPU chip counters, ex. mips, cache miss, etc.)
- Solaris CPU-Set STAT (mpstat -a)
- Linux MPSTAT v2
- MySQL STAT
- InnoDB STAT
- InnoDB I/O STAT (adoption of Neel's DTrace script )
- PgSQL STAT (PostgreSQL stats)
- ZoneLOAD: zoneid => zonename
Added: 2009-07-06 License: GPL Price: FREE
15 downloads
PHP Sessions Management Class 1.0.3
PHP Sessions Management Class is a php class to handle sessions by using a mySQL database. more>>
PHP Sessions Management Class is a php class to handle sessions by using a mySQL database for session related data storage providing better security then the default session handler used by PHP.
If you are not familiar with what php sessions are and what are they good for, check out the dedicated chapter in the php manual
If you are familiar with php sessions and you want to use this php class in your projects then remember that to prevent session hijacking, you must not forget to use the regenerate_id() method whenever you do a privilege change in your application
Before usage, make sure you use the session_data.sql file (which is a sql dump file generated with phpMyAdmin) from the install_sql folder to set up the table used by the class
You dont need to modify anything in your previous applications: after instantiating the php class, just use sessions as you would normally.
Note:
The class assumes that there is an active connection to a mySQL database and it does not attempt to create one. This is due to the fact that, usually, there is a config file that holds the database connection related information and another class, or function that handles database connection. If this is not how you do it, you can easily adapt the code by putting the database connection related code in the "open" method of the class.
Enhancements:
- The get_users_online() method is now more accurate as it now runs the garbage collector before getting the number of online users.
- The structure of the MySQL table used by the class was tweaked in so that the "http_user_agent" field was changed from VARCHAR(255) to TEXT to accomodate user agent strings that are longer than 255 characters.
- The "session_data" field was also changed from TEXT to BLOB to help users who store a large amount of data in sessions.
<<lessIf you are not familiar with what php sessions are and what are they good for, check out the dedicated chapter in the php manual
If you are familiar with php sessions and you want to use this php class in your projects then remember that to prevent session hijacking, you must not forget to use the regenerate_id() method whenever you do a privilege change in your application
Before usage, make sure you use the session_data.sql file (which is a sql dump file generated with phpMyAdmin) from the install_sql folder to set up the table used by the class
You dont need to modify anything in your previous applications: after instantiating the php class, just use sessions as you would normally.
Note:
The class assumes that there is an active connection to a mySQL database and it does not attempt to create one. This is due to the fact that, usually, there is a config file that holds the database connection related information and another class, or function that handles database connection. If this is not how you do it, you can easily adapt the code by putting the database connection related code in the "open" method of the class.
Enhancements:
- The get_users_online() method is now more accurate as it now runs the garbage collector before getting the number of online users.
- The structure of the MySQL table used by the class was tweaked in so that the "http_user_agent" field was changed from VARCHAR(255) to TEXT to accomodate user agent strings that are longer than 255 characters.
- The "session_data" field was also changed from TEXT to BLOB to help users who store a large amount of data in sessions.
Download (0.020MB)
Added: 2006-12-16 License: Free for non-commercial use Price:
1044 downloads
Autodia::Handler::Torque 2.03
Autodia::Handler::Torque Perl module contains an AutoDia handler for Torque xml database schema. more>>
Autodia::Handler::Torque Perl module contains an AutoDia handler for Torque xml database schema.
This provides Autodia with the ability to read Torque Database Schema files, allowing you to convert them via the Diagram Export methods to images (using GraphViz and VCG) or html/xml using custom templates or to Dia.
SYNOPSIS
use Autodia::Handler::Torque;
my $handler = Autodia::Handler::dia->New(%Config);
$handler->Parse(filename); # where filename includes full or relative path.
Description
The Torque handler will parse the xml file using XML::Simple and populating the diagram object with class, superclass, and relationships representing tables and relationships.
The Torque handler is registered in the Autodia.pm module, which contains a hash of language names and the name of their respective language.
An example Torque database schema is shown here - its actually a rather nice format apart from the Java studlyCaps..
< ?xml version="1.0" encoding="ISO-8859-1" standalone="no" ? >
< !DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_0_1.dtd" >
< database name="INTERPLANETARY" >
< table name="CIVILIZATION" >
< column name="CIV_ID" required="true" autoIncrement="true" primaryKey="true" type="INTEGER"/ >
< column name="NAME" required="true" type="LONGVARCHAR"/ >
< /table >
< table name="CIV_PEOPLE" >
< column name="CIV_ID" required="true" primaryKey="true" type="INTEGER"/ >
< column name="PEOPLE_ID" required="true" primaryKey="true" type="INTEGER"/ >
< foreign-key foreignTable="CIVILIZATION" >
< reference local="CIV_ID" foreign="CIV_ID"/ >
< /foreign-key >
< foreign-key foreignTable="PEOPLE" >
< reference local="PEOPLE_ID" foreign="PEOPLE_ID"/ >
< /foreign-key >
< /table >
< table name="PEOPLE" >
< column name="PEOPLE_ID" required="true" autoIncrement="true" primaryKey="true" type="INTEGER"/ >
< column name="NAME" required="true" size="255" type="VARCHAR"/ >
< column name="SPECIES" type="INTEGER" default="-2"/ >
< column name="PLANET" type="INTEGER" default="-1"/ >
< /table >
< /database >
<<lessThis provides Autodia with the ability to read Torque Database Schema files, allowing you to convert them via the Diagram Export methods to images (using GraphViz and VCG) or html/xml using custom templates or to Dia.
SYNOPSIS
use Autodia::Handler::Torque;
my $handler = Autodia::Handler::dia->New(%Config);
$handler->Parse(filename); # where filename includes full or relative path.
Description
The Torque handler will parse the xml file using XML::Simple and populating the diagram object with class, superclass, and relationships representing tables and relationships.
The Torque handler is registered in the Autodia.pm module, which contains a hash of language names and the name of their respective language.
An example Torque database schema is shown here - its actually a rather nice format apart from the Java studlyCaps..
< ?xml version="1.0" encoding="ISO-8859-1" standalone="no" ? >
< !DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_0_1.dtd" >
< database name="INTERPLANETARY" >
< table name="CIVILIZATION" >
< column name="CIV_ID" required="true" autoIncrement="true" primaryKey="true" type="INTEGER"/ >
< column name="NAME" required="true" type="LONGVARCHAR"/ >
< /table >
< table name="CIV_PEOPLE" >
< column name="CIV_ID" required="true" primaryKey="true" type="INTEGER"/ >
< column name="PEOPLE_ID" required="true" primaryKey="true" type="INTEGER"/ >
< foreign-key foreignTable="CIVILIZATION" >
< reference local="CIV_ID" foreign="CIV_ID"/ >
< /foreign-key >
< foreign-key foreignTable="PEOPLE" >
< reference local="PEOPLE_ID" foreign="PEOPLE_ID"/ >
< /foreign-key >
< /table >
< table name="PEOPLE" >
< column name="PEOPLE_ID" required="true" autoIncrement="true" primaryKey="true" type="INTEGER"/ >
< column name="NAME" required="true" size="255" type="VARCHAR"/ >
< column name="SPECIES" type="INTEGER" default="-2"/ >
< column name="PLANET" type="INTEGER" default="-1"/ >
< /table >
< /database >
Download (0.060MB)
Added: 2007-06-21 License: Perl Artistic License Price:
855 downloads
Secleted [ 0 ] software to compare
- Page: 1 of 2
- 1
- 2
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above varchar search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed