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

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

Serving Software Downloads in 956 Categories, Downloaded 50.339.622 Times

Sybase::Metadata 3

Company: Mike Obrien
Date Added: June 16, 2013  |  Visits: 383

Sybase::Metadata

Report Broken Link
Printer Friendly Version


Product Homepage
Download (39 downloads)



Sybase::Metadata provides methods to extract and search through Sybase metadata, retrieving it for use in either general code or DB Browser applications.<br />EXPORT<br /><br /> NB: You MUST have DBI and DBD:Sybase insatlled to use this module!<br /><br />#################################################################### # # new # + Construct object and return handle # # + Input: None # # + Output: Object handle/pointer # #################################################################### Example:<br /><br />my $mdHandle = Sybase::Metadata->new();<br /><br />#################################################################### # # Initialize # + Initialize desired db connection and return global handle # NB: You MUST have DBI and DBD:Sybase insatlled to use this module! # # + Input: Pointer to hash of DB properties containing: # - Server # - User # - Password # - Database # # + Output: None but initializes db handle to be used internally # #################################################################### Example:<br /><br />my %dbHash = ( SERVER => 'BIGDB_SERVER', USER => 'SOME_USER', PASSWORD => 'changeme', DATABASE => 'BIGDB_DEV');<br /><br />my $hashPtr = %dbHash;<br /><br />my $mdHandle = Sybase::Metadata->new();<br /><br />$mdHandle->Initialize($hashPtr);<br /><br />#################################################################### # # GetDatabases # + Get a list of all databases and their space usage info # + Input : None # + Output : Ref to array of hashes containing: # DBName # DBID # Owner # CreateDate # # #################################################################### Example:<br /><br />print "Testing GetDatabases ... n";<br /><br />my $dbListRef = $mdHandle->GetDatabases();<br /><br />foreach ( @{$dbListRef}) { print "DBName = $_->{DBName}, DBID = $_->{DBID}, Owner = $_->{Owner}, CreateDate = $_->{CreateDate} n"; }<br /><br />#################################################################### # # GetTables # + Get a list of tables in present database, Useful for drill # down to table details # + Input : None # + Output : Ref to array of hashes containing: # Name (name of table) # TableOID # Owner # CreateDate # # #################################################################### Example:<br /><br />print "n Testing GetTables ... n";<br /><br />my $dbListRef = $mdHandle->GetTables();<br /><br />foreach ( @{$dbListRef}) { print "Name = $_->{Name}, TableOID = $_->{TableOID}, Owner = $_->{Owner}, CreateDate = $_->{CreateDate} n"; }<br /><br />#################################################################### # # GetProcs # + Get a list of tables in present database, Useful for drill # down to table details # + Input : None # + Output : Ref to array of hashes containing: # Name (name of proc) # ProcOID # Owner # CreateDate # #################################################################### Example:<br /><br />print "n Testing GetProcs ... n";<br /><br />my $dbListRef = $mdHandle->GetProcs();<br /><br />foreach ( @{$dbListRef}) { print "Name = $_->{Name}, ProcOID = $_->{ProcOID}, Owner = $_->{Owner}, CreateDate = $_->{CreateDate} n"; }<br /><br />#################################################################### # # GetViews # + Get a list of views in present database, Useful for drill # down to view details # + Input : None # + Output : Ref to array of hashes containing: # Name (name of view) # ViewOID # Owner # CreateDate # #################################################################### Example:<br /><br />print "n Testing GetViews ... n";<br /><br />my $dbListRef = $mdHandle->GetViews();<br /><br />foreach ( @{$dbListRef}) { print "Name = $_->{Name}, ViewOID = $_->{ViewOID}, Owner = $_->{Owner}, CreateDate = $_->{CreateDate} n"; }<br /><br />#################################################################### # # GetTriggers # + Get a list of views in present database, Useful for drill # down to view details # + Input : None # + Output : Ref to array of hashes containing: # TriggerName # TriggerOID # TableName # TableOID # #################################################################### Example:<br /><br />print "n Testing GetTriggers ... n";<br /><br />my $dbListRef = $mdHandle->GetTriggers();<br /><br />foreach ( @{$dbListRef}) { print "TriggerName = $_->{TriggerName}, TriggerOID = $_->{TriggerOID}, TableName = $_->{TableName}, TableOID = $_->{TableOID} n"; }<br /><br />#################################################################### # # GetRIs # + Get a list of referential integrities in present database # + Input : None # + Output : Ref to array of hashes containing: # Name (name of referential inegtrity) # RIOID # FromTable # FromTableOID # ToTable # ToTableOID # #################################################################### Example:<br /><br />print "n Testing GetRIs ... n";<br /><br />my $dbListRef = $mdHandle->GetRIs();<br /><br />foreach ( @{$dbListRef}) { print "Name = $_->{Name}, RIOID = $_->{RIOID}, FromTable = $_->{FromTable}, FromTableOID = $_->{FromTableOID}, ToTable = $_->{ToTable}, ToTableOID = $_->{ToTableOID} n"; }<br /><br />#################################################################### # # GetIndexes # + Get a list of indexes in present database # + Input : None # + Output : Ref to array of hashes containing: # Name (name of index) # OnTable # CreateDate # #################################################################### Example:<br /><br />print "n Testing GetIndexes ... n";<br /><br />my $dbListRef = $mdHandle->GetIndexes();<br /><br />foreach ( @{$dbListRef}) { print "Name = $_->{Name}, OnTable = $_->{OnTable}, CreateDate = $_->{CreateDate} n"; }<br /><br />#################################################################### # # DescribeTable # + Get table details including column names, types, null/not null # + Input : Table Name # + Output : Ref to array of hashes containing: # Name (of column) # Type # NullType (NULL/NOT NULL) # #################################################################### Example:<br /><br />print "n Testing DescribeTable ... n";<br /><br />my $dbListRef = $mdHandle->DescribeTable("MkEqTrade");<br /><br />foreach ( @{$dbListRef}) { print "Name -> $_->{Name}, Type = $_->{Type}, NullType = $_->{NullType} n"; }<br /><br />#################################################################### # # DescribeProc # + Get stored proc text excluding create statements, etc # + Input : Proc Name # + Output : Ref to array containing lines of text # #################################################################### Example:<br /><br />print "n Testing DescribeProc ... n";<br /><br />my $dbListRef = $mdHandle->DescribeProc("MkGetEqProduct");<br /><br />foreach ( @{$dbListRef}) { print "$_ "; }<br /><br />#################################################################### # # DescribeTrigger # + Get trigger text excluding create statements, etc # + Input : Trigger Name # + Output : Ref to array containing lines of text # #################################################################### Example:<br /><br />print "n Testing DescribeTrigger ... n";<br /><br />my $dbListRef = $mdHandle->DescribeTrigger("trigEqProdUpd");<br /><br />foreach ( @{$dbListRef}) { print "$_ "; }<br /><br />#################################################################### # # DescribeView # + Get view text excluding create statements, etc # + Input : ViewName # + Output : Ref to array containing lines of text # #################################################################### Example:<br /><br />print "n Testing DescribeView ... n";<br /><br />my $dbListRef = $mdHandle->DescribeView("vEqHeaders");<br /><br />foreach ( @{$dbListRef}) { print "$_ "; }<br /><br />#################################################################### # # GetUsers # + Get names/groups of all users in this database # + Input : None # + Output : Ref to array of hashes containing: # UserName # UserID # GroupName # GroupID # # #################################################################### Example:<br /><br />print "n Testing GetUsers ... n";<br /><br />my $dbListRef = $mdHandle->GetUsers();<br /><br />foreach ( @{$dbListRef}) { print "UserName = $_->{UserName}, UserID = $_->{UserID}, GroupName = $_->{GroupName}, GroupID = $_->{GroupID} n"; }<br /><br />#################################################################### # # GetLogins # + Get names of all server level logins # + Input : None # + Output : Ref to hash containing: # LoginName # LoginID # DefaultDB # #################################################################### Example:<br /><br />print "n Testing GetLogins ... n";<br /><br />my $dbListRef = $mdHandle->GetLogins();<br /><br />foreach ( @{$dbListRef}) { print "LoginName = $_->{LoginName}, LoginID = $_->{LoginID}, DefaultDB = $_->{DefaultDB} n"; }<br /><br />#################################################################### # # GetGroups # + Get names of all groups in present database # + Input : None # + Output : Ref to hash containing: # GroupName # GroupID # #################################################################### Example:<br /><br />print "n Testing GetGroups ... n";<br /><br />my $dbListRef = $mdHandle->GetGroups();<br /><br />foreach ( @{$dbListRef}) { print "GroupName = $_->{GroupName}, GroupID = $_->{GroupID} n"; }<br /><br />#################################################################### # # GetGroupMembers # + Get list of all members of a given group # + Input : GroupName # + Output : Ref to hash containing: # UserName # UserID # #################################################################### Example:<br /><br />print "n Testing GetGroupMembers ... n";<br /><br />my $dbListRef = $mdHandle->GetGroupMembers("app_group");<br /><br />foreach ( @{$dbListRef}) { print "UserName = $_->{UserName}, UserID = $_->{UserID} n"; }<br /><br />#################################################################### # # ExtractTableSQL # + Get entire stored proc with drop/create statements # + Input : Table Name # + Output : Ref to array containing text # #################################################################### Example:<br /><br />print "n Testing ExtractTableSQL ... n";<br /><br />my $dbListRef = $mdHandle->ExtractTableSQL("MkEqProductLog");<br /><br />foreach ( @{$dbListRef}) { print "$_ "; }<br /><br />#################################################################### # # ExtractViewSQL # + Get entire view with drop/create statements # + Input : View Name or View OID # + Output : Ref to array containing text # #################################################################### Example:<br /><br />print "n Testing ExtractViewSQL ... n";<br /><br />my $dbListRef = $mdHandle->ExtractViewSQL("vEqHeaders");<br /><br />foreach ( @{$dbListRef}) { print "$_ "; }<br /><br />#################################################################### # # ExtractProcSQL # + Get entire stored procedure with drop/create statements # + Input : Proc Name or Proc OID # + Output : Ref to array containing text # #################################################################### Example:<br /><br />print "n Testing ExtractProcSQL ... n";<br /><br />my $dbListRef = $mdHandle->ExtractProcSQL("MkGetEqProduct");<br /><br />foreach ( @{$dbListRef}) { print "$_ "; }<br /><br />#################################################################### # # ExtractTriggerSQL # + Get entire trigger with drop/create statements # + Input : Trigger Name or Trigger OID # + Output : Ref to array containing text # #################################################################### Example:<br /><br />print "n Testing ExtractTriggerSQL ... n";<br /><br />my $dbListRef = $mdHandle->ExtractTriggerSQL("trigEqProdUpd");<br /><br />foreach ( @{$dbListRef}) { print "$_ "; }<br /><br />#################################################################### # # ExtractRISQL # + Get entire referential integrity with drop/create statements # + Input : RI Name # + Output : Ref to array containing text # #################################################################### Example:<br /><br />print "n Testing ExtractRISQL ... n";<br /><br />my $dbListRef = $mdHandle->ExtractRISQL("FK_EQTRDATTR_TRDID");<br /><br />foreach ( @{$dbListRef}) { print "$_ "; }<br /><br />#################################################################### # # SearchProcNames # + Search proc names for a given text pattern or sybase # regular expression. Will validate regular expression first. # + Input : Pattern (string with Sybase Reg Ex optional) # + Output : Ref To Array of hashes containing: # ProcName # ProcOID # #################################################################### Example:<br /><br />print "n Testing SearchProcNames ... n";<br /><br />my $dbListRef = $mdHandle->SearchProcNames("%Get%");<br /><br />foreach ( @{$dbListRef}) { print "ProcName = $_->{ProcName}, ProcOID = $_->{ProcOID} n"; }<br /><br />#################################################################### # # SearchProcText # + Search proc text for a given text pattern or sybase # regular expression. Will validate regular expression first. # + Input : Pattern (string with Sybase Reg Ex optional) # + Output : Ref To Array of hashes containing: # ProcName # ProcOID # Snippett (text within proc containing pattern) # #################################################################### Example:<br /><br />print "n Testing SearchProcText ... n";<br /><br />my $dbListRef = $mdHandle->SearchProcText("%select%");<br /><br />foreach ( @{$dbListRef}) { print "ProcName = $_->{ProcName}, ProcOID = $_->{ProcOID}, Snippett = $_->{Snippett} n"; }<br /><br />#################################################################### # # SearchTriggerNames # + Search trigger names for a given text pattern or sybase # regular expression. Will validate regular expression first. # + Input : Pattern (string with Sybase Reg Ex optional) # + Output : Ref To Array of hashes containing: # TriggerName # TriggerOID # TableName # TableOID # #################################################################### Example:<br /><br />print "n Testing SearchTriggerNames ... n";<br /><br />my $dbListRef = $mdHandle->SearchTriggerNames("%[Uu]pd%");<br /><br />foreach ( @{$dbListRef}) { print "TriggerName = $_->{TriggerName}, TriggerOID = $_->{TriggerOID}, TableName = $_->{TableName}, TableOID = $_->{TableOID} n"; }<br /><br />#################################################################### # # SearchTriggerText # + Search trigger text for a given text pattern or sybase # regular expression. Will validate regular expression first. # + Input : Pattern (string with Sybase Reg Ex optional) # + Output : Ref To Array of hashes containing: # TriggerName # TriggerOID # TableName # TableOID # Snippett (piece of code containing pattern) # #################################################################### Example:<br /><br />print "n Testing SearchTriggerText ... n";<br /><br />my $dbListRef = $mdHandle->SearchTriggerText("%ISIN%");<br /><br />foreach ( @{$dbListRef}) { print "TriggerName = $_->{TriggerName}, TriggerOID = $_->{TriggerOID}, TableName = $_->{TableName}, TableOID = $_->{TableOID}, Snippett = $_->{Snippett} n"; }<br /><br />#################################################################### # # SearchColumns # + Search column names for a given text pattern or sybase # regular expression. Will validate regular expression first. # + Input : Pattern (string with Sybase Reg Ex optional) # + Output : Ref To Array of hashes containing: # ColumnName # TableName # TableOID # #################################################################### Example:<br /><br />print "n Testing SearchColumns ... n";<br /><br />my $dbListRef = $mdHandle->SearchColumns("%Product%");<br /><br />foreach ( @{$dbListRef}) { print "ColumnName = $_->{ColumnName}, TableName = $_->{TableName}, TableOID = $_->{TableOID} n"; }<br /><br />#################################################################### # # SearchTableNames # + Search table names for a given text pattern or sybase # regular expression. Will validate regular expression first. # + Input : Pattern (string with Sybase Reg Ex optional) # + Output : Ref To Array of hashes containing: # TableName # TableOID # #################################################################### Example:<br /><br />print "n Testing SearchTableNames ... n";<br /><br />my $dbListRef = $mdHandle->SearchTableNames("%Product%");<br /><br />foreach ( @{$dbListRef}) { print " TableName = $_->{TableName}, TableOID = $_->{TableOID} n"; }<br /><br />#################################################################### # # SearchViewNames # + Search view names for a given text pattern or sybase # regular expression. Will validate regular expression first. # + Input : Pattern (string with Sybase Reg Ex optional) # + Output : Ref To Array of hashes containing: # ViewName # ViewOID # #################################################################### Example:<br /><br />print "n Testing SearchViewNames ... n";<br /><br />my $dbListRef = $mdHandle->SearchViewNames("%Eq%");<br /><br />foreach ( @{$dbListRef}) { print " ViewName = $_->{ViewName}, ViewOID = $_->{ViewOID} n"; }<br /><br />#################################################################### # # SearchViewText # + Search view names for a given text pattern or sybase # regular expression. Will validate regular expression first. # + Input : Pattern (string with Sybase Reg Ex optional) # + Output : Ref To Array of hashes containing: # ViewName # ViewOID # Snippett (bit of view containing pattern) # #################################################################### Example:<br /><br />print "n Testing SearchViewText ... n";<br /><br />my $dbListRef = $mdHandle->SearchViewText("%[Ss]elect%");<br /><br />foreach ( @{$dbListRef}) { print " ViewName = $_->{ViewName}, ViewOID = $_->{ViewOID}, Snippett = $_->{Snippett} n"; }<br /><br />#################################################################### # # SearchIndexNames # + Search index names for a given text pattern or sybase # regular expression. Will validate regular expression first. # + Input : Pattern (string with Sybase Reg Ex optional) # + Output : Ref To Array of hashes containing: # IndexName # TableName # TableOID # #################################################################### Example:<br /><br />print "n Testing SearchIndexNames ... n";<br /><br />my $dbListRef = $mdHandle->SearchIndexNames("%EQ%");<br /><br />foreach ( @{$dbListRef}) { print " IndexName = $_->{IndexName}, TableName = $_->{TableName}, TableOID = $_->{TableOID} n"; }<br /><br />#################################################################### # # SearchUsers # + Search user names for a given text pattern or sybase # regular expression. Will validate regular expression first. # + Input : Pattern (string with Sybase Reg Ex optional) # + Output : Ref To Array of hashes containing: # UserName # UserID # #################################################################### Example:<br /><br />print "n Testing SearchUsers ... n";<br /><br />my $dbListRef = $mdHandle->SearchUsers("%app%");<br /><br />foreach ( @{$dbListRef}) { print " UserName = $_->{UserName}, UserID = $_->{UserID} n"; }<br /><br />#################################################################### # # SearchGroups # + Search group names for a given text pattern or sybase # regular expression. Will validate regular expression first. # + Input : Pattern (string with Sybase Reg Ex optional) # + Output : Ref To Array of hashes containing: # GroupName # GroupID # #################################################################### Example:<br /><br />print "n Testing SearchGroups ... n";<br /><br />my $dbListRef = $mdHandle->SearchGroups("%app%");<br /><br />foreach ( @{$dbListRef}) { print " GroupName = $_->{GroupName}, GroupID = $_->{GroupID} n"; }<br /><br />#################################################################### # # CloseConnection # + Clean up and close DB handle # + Input: None needed # #################################################################### Example:<br /><br />$mdHandle->CloseConnection();

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Array Dblistref Exampleprint Expression Hashes Input Names Output Pattern Print Quotmy Regular Sybase Tablename Tableoid Testing Validate
Users rating: 0/10

License: Freeware Size: 10.24 KB
USER REVIEWS
More Reviews or Write Review


SYBASE::METADATA RELATED
Libraries  -  Bio::Phylo::IO 0.17 RC6
Bio::Phylo::IO Perl module contains input and output of phylogenetic data. SYNOPSIS use Bio::Phylo::IO; # parsing a tree from a newick string my $tree_string = (((A,B),C),D);; my $tree = Bio::Phylo::IO->parse( -string => $tree_string, #...
143.36 KB  
Libraries  -  IO::InSitu 0.0.2
IO::InSitu is a Perl module to avoid clobbering files opened for both input and output. SYNOPSIS use IO::InSitu; my ($in, $out) = open_rw($infile_name, $outfile_name); for my $line ( ) { $line =~ s/foo/bar/g; print {$out} $line; }...
6.14 KB  
Networking Tools  -  lifstat 2006-10-31
lifstat is a small Linux utility that reads /proc/net/dev and reports input and output statistics for network interfaces. Edit the Makefile to change PREFIX from the default /usr/local if you want. $ make ($ su) $ make instal Whats New in...
5.12 KB  
Audio Tools  -  oss2jack 0.24
oss2jack creates an OSS device which redirects its input and output to the Jack Audio Connection Kit. oss2jack supports a large subset of the OSS specification, including full duplex I/O and mmap. oss2jack uses Jeremy Elsons useful fusd library...
92.16 KB  
Libraries  -  libspectrum 0.2.2
libspectrum is a library designed to make the input and output of some ZX Spectrum emulator files slightly easier. libspectrum is intended to be usable on Unix variants, Mac OS X and Win32. Currently, it is mainly (only?) used by Fuse, but other...
 
Audio Tools  -  OpenAL mixer For Linux 1.2.0
OpenAL mixer aims to provide a multiplatform API built on top of OpenAL to get/set volume values (including support for capture devices) and list, select and mute input and output lines.
10.24 KB  
Utilities  -  Speech Calculator 1.0
PAC Calculator with Speech Input and Output functionality Built in Java
11.16 MB  
Network & Internet  -  lifstat for Linux 2010-02-28
lifstat is a small Linux utility that reads /proc/net/dev and reports input and output statistics for network interfaces. Edit the Makefile to change PREFIX from the default /usr/local if you want. Installation:
10.24 KB  
Development Editors  -  Baby Names 2011 1.9.5.7
Baby Names helps you print high quality personalised scrolls, greeting cards, fridge magnets, keyrings, mugs, mouse mats, coasters, desk clocks and pens based upon any baby name. Choose from many different designs to produce the perfect gift for...
 
Games  -  Tiff Splitter 1.0
This program takes any multipage tiff and splits it down into its own separate pages.It includes a browse function for both the input and output folders whilst displaying all selected files. The original file containing the multipage tiff is left...
1.29 MB  
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 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  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB