-
-
13 Oct 2011 19:03:02 UTC
- Distribution: DBIx-Class-Indexed
- Module version: 0.03
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (860 / 0 / 0)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (4.58KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- DBIx::Class
- Module::Load
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
DBIx::Class::Indexed - Index data via external indexing facilities.
SYNOPSIS
package Foo; use base qw( DBIx::Class ); __PACKAGE__->load_components( qw( Indexed Core ) ); __PACKAGE__->set_indexer( 'WebService::Lucene', { server => 'http://localhost:8080/lucene/', index => 'stuff', }); __PACKAGE__->add_columns( foo_id => { data_type => 'integer', is_auto_increment => 1, }, name => { data_type => 'varchar', size => 256, indexed => 1, }, description => { data_type => 'text', indexed => 1, }, );
ACCESSORS
indexer_package( [ $indexer ] )
Sets which indexer will be responsible for indexing this class' data. Corresponds to the package name after the DBIx::Class::Indexer prefix.
indexer_connection_info( [ \%info ] )
Sets the extra information passed to the indexer on instantiation.
index_on_insert
Determines whether or not DBIx::Class::Indexed will index the document when it is inserted.
index_on_update
Determines whether or not DBIx::Class::Indexed will index the document when it is updated.
index_on_delete
Determines whether or not DBIx::Class::Indexed will remove the document when it is deleted.
METHODS
indexer( )
Accessor for the indexer object; lazy loaded.
set_indexer( $name [, \%connection_info ] )
Set the indexer information. Connection information is stored in the
indexer_connection_info
accessor and the package name is stored inindexer_package
.insert( )
Sends the object to the indexer's
insert
method, ifindex_on_insert
is true.update( )
Sends the object to the indexer's
update
method, ifindex_on_update
is true.delete( )
Sends the object to the indexer's
delete
method, ifindex_on_delete
is true.register_column ( $column, \%info )
Overrides DBIx::Class's
register_column
. If %info contains the key 'indexed', callsregister_field
.add_index_fields ( @fields )
Behaves similarly to DBIx::Class's
add_columns
. Callsregister_field
underneath.register_field( $field, \%info )
Registers a field as indexed.
AUTHORS
Adam Paynter <adapay@cpan.org>
Brian Cassidy <bricas@cpan.org>
COPYRIGHT AND LICENSE
Copyright 2006 by Adam Paynter, 2007-2011 by Brian Cassidy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install DBIx::Class::Indexed, copy and paste the appropriate command in to your terminal.
cpanm DBIx::Class::Indexed
perl -MCPAN -e shell install DBIx::Class::Indexed
For more information on module installation, please visit the detailed CPAN module installation guide.