MayaChemTools

Previous  TOC  NextDBUtil.pmCode | PDF | PDFGreen | PDFA4 | PDFA4Green

NAME

DBUtil

SYNOPSIS

use DBUtil;

use DBUtil qw(:all);

DESCRIPTION

DBUtil module provides the following functions:

DBConnect, DBDisconnect, DBFetchSchemaTableNames, DBSQLToTextFile , DBSetupDescribeSQL, DBSetupSelectSQL

DBUtil package uses Perl DBI for interacting with MySQL or Oracle databases.

FUNCTIONS

DBConnect
$DBHandle = DBConnect($DBDriver, $DBName, $DBHost, $DBUser, $DBPassword);

Connects to a database using specified parameters and returns a DBHandle

DBDisconnect
DBDisconnect($DBHandle);

Disconnects from a database specified by DBHandle.

DBFetchSchemaTableNames
@SchemaTableNames = DBFetchSchemaTableNames($DBDriver, $DBHandle, $SchemaName);

Returns an array of all the table names in a database SchemaName

DBSetupDescribeSQL
$DescribeSQL = DBSetupDescribeSQL($DBDriver, $TableName, [$SchemaName]);

Sets up and returns a SQL statement to describe a table for MySQL or Oracle

DBSetupSelectSQL
$SelectSQL = DBSetupSelectSQL($DBDriver, $TableName, $SchemaName);

Sets up and returns a SQL statement to retrieve all columns from a table for MySQL or Oracle.

DBSQLToTextFile
$Status = DBSQLToTextFile($DBHandle, $SQL, \*TEXTFILE, $OutDelim, $OutQuote, [$ExportDataLabels, $ExportLOBs, $ReplaceNullStr]);

Executes a SQL statement and export all data into a text file

AUTHOR

Manish Sud

COPYRIGHT

Copyright (C) 2004-2008 Manish Sud. All rights reserved.

This file is part of MayaChemTools.

MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

 

 

Previous  TOC  NextApril 29, 2008DBUtil.pm