Scott Cain > Bio-DB-Das-Chado-0.34 > gmod_chado_fts_prep.pl

Download:
Bio-DB-Das-Chado-0.34.tar.gz

Annotate this POD

View/Report Bugs
Source  

NAME ^

gmod_chado_fts_prep.pl - prepares a Chado schema to use full text searching

SYNOPSIS ^

  % gmod_chado_fts_prep.pl [--dbprofile (name)]

COMMAND-LINE OPTIONS ^

  --dbprfile    Specify a gmod.conf profile name (otherwise use default)

DESCRIPTION ^

note about pg version note about all_feature_names materialized view

AUTHOR ^

Scott Cain <scain@cpan.org>

Copyright (c) 2010

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

Internally used methods ^

validate_prereqs

Usage
  validate_prereqs()
Function

Checks that the Pg version is OK and that all_feature_names is a table an not a view.

Returns

Nothing.

Arguments

The DBI database handle for the database to be modified.

create_searchable_columns

Usage
  create_searchable_columns($dbh);
Function

To modify existing feature, synonym and dbxref tables to add a "searchable" column for names and accessions.

Returns

Nothing.

Arguments

The DBI database handle for the database to be modified.

create_search_triggers

Usage
  create_search_triggers($dbh)
Function

Creates database triggers on the searchable columns to keep them up to date.

Returns

Nothing.

Arguments

The database handle, $dbh, for the database to be modified.

From Leighton's notes:

Add trigger function to each table to populate the searchable column when a data-modifying operation occurs on the target field.

This is made much easier by the existence of the tsvector_update_trigger() procedure.

create_all_feature_names

Usage
  create_all_feature_names($dbprof)
Function

Creates the materialized view of all_feature_names, making sure to dematerialize it first. It does this by making system calls to the gmod_materialized_view_tool.pl script that comes with the Chado distribution.

Returns

Nothing.

Arguments

The name of the Bio::GMOD::DB::Config profile.

syntax highlighting: