NAME

CDBI::Outline - A Class::DBI library for Fry::Shell which displays several database queries in an outline format.

VERSION

This document describes version 0.02

DESCRIPTION

This module takes a query outline and produces results in the same outline format. To write an outline in one line for commandline apps, there is a shorthand syntax. Take the sample outline:

dog
	rex
	cartoon
		snoopy
		brian
cat		

In shorthand syntax this is 'dog(rex,cartoon(snoopy,brian))cat'. I'll use node to refer to a line in the outline ie 'dog'. There are three characters that delimit indent levels between nodes:

'(':following node is indented one level
')': following node is unindented one level
',': following node remains at same level

Each node is a query chunk which uses the same syntax as &Fry::Lib::CDBI::Basic::cdbi_select. The splitter is define by the _splitter accessor.

For example, here's a simple query outline:

tag=perl(tag=dbi,read)name=Shell::

which means the following query outline:

tags=perl
	tags=dbi
	read
name=Shell::

which would produce:

tags=perl
	tags=dbi
		#results of tags=dbi and tags=perl
	read
		#results of tags=read and tags=perl
name=Shell::
	#results of name=Shell:

The resulting outline produces results under the last level children. By default the query chunks ('tags=perl') are ANDed. If no $splitter ('=' here) is in a given query chunk then a default column name is assumed by $otlcol.

Although there is no required table format I usually use this module for tables that I'm tagging. See Fry::Lib::CDBI::Tags for more detail.

Suggested Modules

Currently this module's main function can only work if Class::DBI::AbstractSearch is installed.

TODO

Use &Fry::Shell::Lib::Basic::get_select as the search engine (same engine used by &cdbi_select). This would support a wider variety of search logic.

SEE ALSO

Fry::Shell,Fry::Lib::CDBI::Tags

AUTHOR

Me. Gabriel that is. If you want to bug me with a bug: cldwalker@chwhat.com If you like using perl,linux,vim and databases to make your life easier (not lazier ;) check out my website at www.chwhat.com.

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.