Matt S Trout > DBIx-Class-0.08100 > dbicadmin

Download:
DBIx-Class-0.08100.tar.gz

Annotate this POD

CPAN RT

New  12
Open  16
Stalled  12
View/Report Bugs
Source   Latest Release: DBIx-Class-0.082700_05

NAME ^

dbicadmin - Execute operations upon DBIx::Class objects.

SYNOPSIS ^

  dbicadmin --op=insert --schema=My::Schema --class=Class --set=JSON
  dbicadmin --op=update --schema=My::Schema --class=Class --set=JSON --where=JSON
  dbicadmin --op=delete --schema=My::Schema --class=Class --where=JSON
  dbicadmin --op=select --schema=My::Schema --class=Class --where=JSON --format=tsv

DESCRIPTION ^

This utility provides the ability to run INSERTs, UPDATEs, DELETEs, and SELECTs on any DBIx::Class object.

OPTIONS ^

op

The type of operation. Valid values are insert, update, delete, and select.

schema

The name of your schema class.

class

The name of the class, within your schema, that you want to run the operation on.

connect

A JSON array to be passed to your schema class upon connecting. The array will need to be compatible with whatever the DBIC ->connect() method requires.

set

This option must be valid JSON data string and is passed in to the DBIC update() method. Use this option with the update and insert ops.

where

This option must be valid JSON data string and is passed in as the first argument to the DBIC search() method. Use this option with the update, delete, and select ops.

attrs

This option must be valid JSON data string and is passed in as the second argument to the DBIC search() method. Use this option with the update, delete, and select ops.

help

Display this help page.

force

Suppresses the confirmation dialogues that are usually displayed when someone runs a DELETE or UPDATE action.

quiet

Do not display status messages.

trace

Turns on tracing on the DBI storage, thus printing SQL as it is executed.

tlibs

This option is purely for testing during the DBIC installation. Do not use it.

JSON ^

JSON is a lightweight data-interchange format. It allows you to express complex data structures for use in the where and set options.

This module turns on JSON's BareKey and QuotApos options so that your data can look a bit more readable.

  --where={"this":"that"} # generic JSON
  --where={this:'that'}   # with BareKey and QuoteApos

Consider wrapping your JSON in outer quotes so that you don't have to escape your inner quotes.

  --where={this:\"that\"} # no outer quote
  --where='{this:"that"}' # outer quoted

AUTHOR ^

Aran Deltac <bluefeet@cpan.org>

LICENSE ^

You may distribute this code under the same terms as Perl itself.

syntax highlighting: