Mercurial > repos > deepakjadmin > mayatool3_test2
comparison docs/modules/txt/DBUtil.txt @ 0:4816e4a8ae95 draft default tip
Uploaded
author | deepakjadmin |
---|---|
date | Wed, 20 Jan 2016 09:23:18 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4816e4a8ae95 |
---|---|
1 NAME | |
2 DBUtil | |
3 | |
4 SYNOPSIS | |
5 use DBUtil; | |
6 | |
7 use DBUtil qw(:all); | |
8 | |
9 DESCRIPTION | |
10 DBUtil module provides the following functions: | |
11 | |
12 DBConnect, DBDisconnect, DBFetchSchemaTableNames, DBSQLToTextFile, | |
13 DBSetupDescribeSQL, DBSetupSelectSQL | |
14 | |
15 DBUtil package uses Perl DBI for interacting with MySQL Oracle, and | |
16 PostgreSQL databases. | |
17 | |
18 FUNCTIONS | |
19 DBConnect | |
20 $DBHandle = DBConnect($DBDriver, $DBName, $DBHost, $DBUser, $DBPassword); | |
21 | |
22 Connects to a database using specified parameters and returns a | |
23 DBHandle. | |
24 | |
25 DBDisconnect | |
26 DBDisconnect($DBHandle); | |
27 | |
28 Disconnects from a database specified by *DBHandle*. | |
29 | |
30 DBFetchSchemaTableNames | |
31 @SchemaTableNames = DBFetchSchemaTableNames($DBDriver, $DBHandle, | |
32 $SchemaName); | |
33 | |
34 Returns an array of all the table names in a database *SchemaName*. | |
35 | |
36 DBSetupDescribeSQL | |
37 $DescribeSQL = DBSetupDescribeSQL($DBDriver, $TableName, [$SchemaName]); | |
38 | |
39 Sets up and returns a SQL statement to describe a table for MySQ, | |
40 Oracle or PostgreSQL. | |
41 | |
42 DBSetupSelectSQL | |
43 $SelectSQL = DBSetupSelectSQL($DBDriver, $TableName, $SchemaName); | |
44 | |
45 Sets up and returns a SQL statement to retrieve all columns from a | |
46 table for MySQL, Oracle, or PostgreSQL. | |
47 | |
48 DBSQLToTextFile | |
49 $Status = DBSQLToTextFile($DBHandle, $SQL, \*TEXTFILE, $OutDelim, | |
50 $OutQuote, [$ExportDataLabels, $ExportLOBs, | |
51 $ReplaceNullStr]); | |
52 | |
53 Executes a *SQL* statement and export all data into a text file. | |
54 | |
55 AUTHOR | |
56 Manish Sud <msud@san.rr.com> | |
57 | |
58 COPYRIGHT | |
59 Copyright (C) 2015 Manish Sud. All rights reserved. | |
60 | |
61 This file is part of MayaChemTools. | |
62 | |
63 MayaChemTools is free software; you can redistribute it and/or modify it | |
64 under the terms of the GNU Lesser General Public License as published by | |
65 the Free Software Foundation; either version 3 of the License, or (at | |
66 your option) any later version. | |
67 |