Import of standalone module to allow access to mSQL databases in perl5.

This commit is contained in:
James FitzGibbon 1996-10-23 23:53:26 +00:00
parent ca9b725c89
commit a4fb514e86
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=4081
5 changed files with 106 additions and 0 deletions

View File

@ -0,0 +1,34 @@
# Version required: 1.11
# Date created: September 29th 1996
# Whom: James FitzGibbon <jfitz@FreeBSD.org>
#
# $Id: Makefile,v 1.2 1996/10/17 03:02:08 jfitz Exp $
#
DISTNAME= MsqlPerl-1.11
PKGNAME= p5-Msql-1.11
CATEGORIES+= databases
MASTER_SITES= ftp://ftp.digital.com/pub/plan/perl/CPAN/modules/by-module/Msql/ \
ftp://ftp.cdrom.com/pub/perl/CPAN/modules/by-module/Msql/ \
ftp://ftp.cis.ufl.edu/pub/perl/CPAN/modules/by-module/Msql/ \
ftp://ftp.leo.org/pub/comp/programming/languages/perl/CPAN/modules/by-module/Msql/ \
ftp://ftp.demon.co.uk/pub/mirrors/perl/CPAN/modules/by-module/Msql/ \
ftp://ftp.lab.kdd.co.jp/lang/perl/CPAN/modules/by-module/Msql/
MAINTAINER= jfitz@FreeBSD.ORG
BUILD_DEPENDS= ${PREFIX}/Minerva/lib/libmsql.a:${PORTSDIR}/databases/msql \
perl5.003:${PORTSDIR}/lang/perl5
do-configure:
@ cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${PREFIX}/bin/perl Makefile.PL
post-install:
.if !defined(NOMANCOMPRESS)
@ for file in ${PREFIX}/man/man1/pmsql.1 ${PREFIX}/lib/perl5/man/man3/Msql.3; do \
gzip -9nf $$file; \
done
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1 @@
MD5 (MsqlPerl-1.11.tar.gz) = 6b13bab3bdaa211083563e59a162163a

View File

@ -0,0 +1 @@
perl5 module for accessing MiniSQL (mSQL) databases.

View File

@ -0,0 +1,58 @@
What you achieve with MsqlPerl
------------------------------
MsqlPerl is an interface between the perl programming language and the
mSQL programming API that comes with the mSQL relational database
management system. All functions provided by the mSQL programming API
are supported.
From perl you activate the interface with the statement
use Msql;
After that you can connect to multiple msql database servers and send
multiple queries to any of them via an simple object oriented
interface. Two types of objects are available: database handles and
statement handles. Perl returns a database handle to the Connect
method like so:
$dbh = Msql->connect($hostname,$databasename);
Once you have connected to a database, you get a statement handle
with:
$sth = $dbh->query("select foo from bar");
You can open as many queries as you like simultaneously by selecting a
different scalar to hold the object:
$another_sth = $dbh->Query("select bar from foo");
The statement handle allows you to step through the virtual table
returned from the database with the FetchRow method:
@row = $sth->fetchrow;
or
%hash = $sth->fetchhash;
You can access all metadata that mSQL supplies for a given table. To
find out the number of rows or the number of fields returned by a
query you simply say:
$numrows = $sth->numrows;
$numfields = $sth->numfields;
To find out the size in bytes for the field with the offset 0 (the
first field of a query), you say:
$length = $sth->length->[0];
The list of the names for each column is returned by
@list => $sth->name;
As for other metadata available, consult the manpage that comes with
MsqlPerl and study the examples in the file t/msql.t, which is the
extensive testscript to test your installation, but is heavily
commented, so you may use it as a tutorial.

View File

@ -0,0 +1,12 @@
bin/pmsql
lib/perl5/site_perl/i386-freebsd/auto/Msql/Msql.so
lib/perl5/site_perl/i386-freebsd/auto/Msql/Msql.bs
lib/perl5/site_perl/i386-freebsd/auto/Msql/.packlist
lib/perl5/site_perl/auto/Msql/autosplit.ix
lib/perl5/site_perl/Msql/Statement.pm
lib/perl5/site_perl/Msql.pm
man/man1/pmsql.1.gz
lib/perl5/man/man3/Msql.3.gz
@dirrm lib/perl5/site_perl/i386-freebsd/auto/Msql
@dirrm lib/perl5/site_perl/auto/Msql
@dirrm lib/perl5/site_perl/Msql