Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tokuhirom/dbix-inspector
https://github.com/tokuhirom/dbix-inspector
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tokuhirom/dbix-inspector
- Owner: tokuhirom
- License: other
- Created: 2010-11-28T08:19:16.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2015-10-11T14:39:15.000Z (about 9 years ago)
- Last Synced: 2024-10-11T20:57:31.791Z (about 1 month ago)
- Language: Perl
- Homepage:
- Size: 194 KB
- Stars: 16
- Watchers: 3
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
# NAME
DBIx::Inspector - Get information from $dbh
# SYNOPSIS
use DBIx::Inspector;
my $dbh = DBI->connect(...) or die;
my $inspector = DBIx::Inspector->new(dbh => $dbh);
my @tables = $inspector->tables;
for my $table (@tables) {
print " pk:\n";
for my $pk ($table->primary_key) {
print " ", $pk->name, "\n";
}
print " columns:\n";
for my $column ($table->columns) {
print " ", $column->name, "\n";
}
}# DESCRIPTION
DBIx::Inspector is a inspector for $dbh.
This is under development. __Any API will change without notice.__
# METHODS
- `my $inspector = DBIx::Inspector->new(dbh => $dbh);`
Create new instance of DBIx::Inspector.
- `my @tables = $inspector->tables();`
Retrieve table objects from $dbh. Every elements in @tables is instance of [DBIx::Inspector::Table](http://search.cpan.org/perldoc?DBIx::Inspector::Table).
- `my $table = $inspector->table($table_name);`
Retrieve table object from $dbh. Return value is instance of [DBIx::Inspector::Table](http://search.cpan.org/perldoc?DBIx::Inspector::Table).
- `my @views = $inspector->views();`
Retrieve view objects from $dbh. Every elements in @views is instance of [DBIx::Inspector::Table](http://search.cpan.org/perldoc?DBIx::Inspector::Table).
- `my $view = $inspector->view($view_name);`
Retrieve view object from $dbh. Return value is instance of [DBIx::Inspector::Table](http://search.cpan.org/perldoc?DBIx::Inspector::Table).
# AUTHOR
Tokuhiro Matsuno
# SEE ALSO
[DBI](http://search.cpan.org/perldoc?DBI)
# LICENSE
Copyright (C) Tokuhiro Matsuno
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.