NAME
FTN::Database::Nodelist - Fidonet/FTN Nodelist SQL Database operations.
VERSION
Version 0.42
DESCRIPTION
FTN::Database::Nodelist is a Perl module containing common nodelist related functions for Fidonet/FTN Nodelist related processing on a Nodelist table in an SQL Database, including one that defines the fields for such a Nodelist table. The SQL database engine is one for which a DBD module exists, defaulting to SQLite.
EXPORT
The following functions are available in this module: define_nodelist_table(), drop_nodelist_table(), ftnnode_index_fields(), remove_ftn_domain().
FUNCTIONS
define_nodelist_table
Syntax: $fields = define_nodelist_table();
This function returns a string that contains the SQL which defines a Nodelist table for use in an SQL database being used for Fidonet/FTN processing,
Except for the id field, which is defined in the create_ftn_table subroutine itself, the defined fields are as follows:
- type
-
The type field may by empty or may contain one of the following keywords: Zone, Region, Host, Hub, Pvt, Hold, or Down. Defaults to an empty string, which indicates a normal nodelist entry.
- zone
-
The zone field is a number in the range of 0 to 32767 that is the zone number for a particular nodelist table entry. Defaults to the number one.
- net
-
The net field is used to contain a number in the range of 0 to 32767 that is the net number for a particular nodelist table entry. Defaults to the number one.
- node
-
The node field is used to contain a number in the range of 0 to 32767 that is the node number for a particular nodelist table entry. Defaults to the number one.
- point
-
The point field is used to contain a number in the range of 0 to 32767 that is the point number for a particular nodelist table entry. Defaults to the number zero.
- region
-
The region field is used to contain a number in the range of 0 to 32767 that is the region number for a particular nodelist table entry. Defaults to the number zero.
- name
-
The name field is used to contain the system name as a string. It can contain up to 48 characters and defaults to an empty string.
- location
-
The location field is used to contain the location of the system as a string. It can contain up to 48 characters and defaults to an empty string.
- sysop
-
The sysop field is used to contain a string indicating the system operator. It can contain up to 48 characters and defaults to an empty string.
- phone
-
The phone field is used to contain a string indicating the phone number for the system. It can contain up to 32 characters and defaults to the string '000-000-000-000.
- baud
-
The baud field is used to contain the baud rate for the system that a particular nodelist table entry is for. It can contain up to 6 characters and defaults to 300.
- flags
-
The flags field is used to contain the nodelist flags for the system that a particular nodelist table entry is for. It can contain up to 128 characters and defaults to a string containing a single space.
- domain
-
The domain field is used to contain the domain name for the system that a particular nodelist table entry is for. It can contain up to 8 characters and defaults to the string fidonet.
- ftnyear
-
The ftnyear field is used to contain the 4 digit integer representing the year that a particular nodelist table entry is valid. Defaults to the number zero.
- yearday
-
The yearday field is used to contain the three digit day of the year that a particular nodelist table entry is valid for. Defaults to the number zero.
- source
-
The source field is used to indicate the source of the data that a particular nodelist table entry is from. For instance, it could be used to give the name of the nodelist file that the data is from. It can contain up to 16 characters and defaults to the string local.
- updated
-
The updated field is used to contain a timestamp for when a particular nodelist table entry was last updated. Defaults to now.
ftnnode_index_fields
Syntax: $fields = ftnnode_index_fields();
This is a function that returns a string containing a comma separated list of the fields that are intended for use in creating the ftnnode database index. The index contains the following fields: zone, net, node, point, domain, ftnyear, and yearday.
EXAMPLES
An example of opening an FTN database, then creating a nodelist table, loading data to it, then creating an index on it, and the closing the database:
use FTN::Database;
use FTN::Database::Nodelist;
my $db_handle = open_ftn_database(\%db_option);
$fields = define_nodelist_table();
create_ftn_table($db_handle, $table_name, $fields);
... (Load data to nodelist table)
ftnnode_index_tables($db_handle, $table_name);
close_ftn_database($db_handle);
AUTHOR
Robert James Clay, <jame at rocasa.us>
BUGS
Please report any bugs or feature requests via the web interface at https://sourceforge.net/p/ftnpl/ftn-database/tickets/. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
Note that you can also report any bugs or feature requests to bug-ftn-database at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=FTN-Database; however, the FTN-Database Issue tracker at the SourceForge project is preferred.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc FTN::Database::Nodelist
You can also look for information at:
FTN::Database issue tracker
RT: CPAN's request tracker
Search CPAN
SEE ALSO
L<FTN::Database>, L<FTN::Database::ToDo>,
L<http://www.ftsc.org/docs/fts-0005.003>
COPYRIGHT & LICENSE
Copyright 2010-2013 Robert James Clay, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.