47 |
index. Have in mind that you can't use aliases (as I<something>) in this SQL |
index. Have in mind that you can't use aliases (as I<something>) in this SQL |
48 |
query (or triggers will be created with wrong fields). |
query (or triggers will be created with wrong fields). |
49 |
|
|
50 |
|
If SQL query isn't specified, default one C<< select * from movies >> will |
51 |
|
be created. That will be B<serious performance hit> if all columns are |
52 |
|
not needed for search. |
53 |
|
|
54 |
=item --pk id |
=item --pk id |
55 |
|
|
56 |
Specify name of primary key column in SQL query. If not specified, C<id> will be used. |
Specify name of primary key column in SQL query. If you allready have primary |
57 |
|
key on table, and it consists of simgle column (compaund keys are not supported) |
58 |
|
it will be picked up automatically. |
59 |
|
|
60 |
|
If you specify value which is not unique, you will get just last occurence |
61 |
|
of that item in index (which might be what you want). That's because specified |
62 |
|
C<pk> column will be used for C<@uri> in Hyper Estraier. |
63 |
|
|
64 |
=item --user login |
=item --user login |
65 |
|
|
70 |
|
|
71 |
=item --debug |
=item --debug |
72 |
|
|
73 |
Dump debugging output. It may be specified multiple times for more verbose debugging. |
Dump debugging output. It may be specified multiple times for more verbose |
74 |
|
debugging. |
75 |
|
|
76 |
=back |
=back |
77 |
|
|
262 |
|
|
263 |
$dbh->commit; |
$dbh->commit; |
264 |
|
|
265 |
|
=head1 SEARCHING |
266 |
|
|
267 |
|
At end of each run, this script will output example search SQL query on STDOUT. |
268 |
|
|
269 |
|
You can use it to quickly construct queries for your application. |
270 |
|
|
271 |
|
=cut |
272 |
|
|
273 |
my $col_names = join(', ', @cols); |
my $col_names = join(', ', @cols); |
274 |
my $col_def = join(', ', map { "$_ text" } @cols); |
my $col_def = join(', ', map { "$_ text" } @cols); |
275 |
|
|
289 |
) as ($col_def); |
) as ($col_def); |
290 |
|
|
291 |
"; |
"; |
292 |
|
|
293 |
|
__END__ |
294 |
|
|
295 |
|
=head1 AUTHOR |
296 |
|
|
297 |
|
Dobrica Pavlinusic <dpavlin@rot13.org> |
298 |
|
|
299 |
|
L<http://www.rot13.org/~dpavlin/> |
300 |
|
|
301 |
|
=head1 LICENSE |
302 |
|
|
303 |
|
This product is licensed under GNU Public License (GPL) v2 or later. |
304 |
|
|
305 |
|
=cut |
306 |
|
|