NAME

Search::Query::Dialect::DBIxClass - Search::Query dialect for simple DBIx::Class query generation

VERSION

version 0.001

SYNOPSIS

use Test::DBIx::Class::Example::Schema;
use Search::Query;

my $schema = Test::DBIx::Class::Example::Schema->connect();
my $query = Search::Query->parser(
        dialect => 'DBIxClass',
        default_field => [qw( name description )],
    )->parse('foo bar -baz');
my $rs = $schema->resultset('Foo')->search($query->as_dbic_query);

DESCRIPTION

Search::Query::Dialect::DBIxClass extends L<Search::Query::Dialect::Native>
by an as_dbic_query method that returns a hashref that can be passed to
L<DBIx::Class::ResultSet/search>.

METHODS

init

Overrides base method and sets DBIx::Class-appropriate defaults. It adds '!#' to the op_regex which is the 'not in list of values' operator.

as_dbic_query

Returns the query as hashref that can be passed to
L<DBIx::Class::ResultSet/search>.

AUTHOR

Alexander Hartmaier <abraxxa@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Alexander Hartmaier.

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