SQL::Tree - Generate a trigger-based SQL tree implementation
0.05 (2021-01-28)
use SQL::Tree; my $sql = SQL::Tree::generate({ driver => $DBI_driver_name, drop => $bool, id => $primary_key_name, name => $source_column_name_for_path, parent => $parent_column_name, path => $path_column_name, table => $table_name, type => $primary_key_type, });
SQL::Tree generates a herarchical data (tree) implementation for SQLite and PostgreSQL using triggers, as described here:
http://www.depesz.com/index.php/2008/04/11/my-take-on-trees-in-sql/
A single subroutine is provided that returns a list of SQL statements:
generate( \%opts ) -> $str
See the sqltree documentation for the list of arguments and their meanings.
sqltree(1) - command line access to SQL::Tree
Mark Lawrence <nomad@null.net>
Copyright 2010-2021 Mark Lawrence <nomad@null.net>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
To install SQL::Tree, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SQL::Tree
CPAN shell
perl -MCPAN -e shell install SQL::Tree
For more information on module installation, please visit the detailed CPAN module installation guide.