DBD-Wire10
view release on metacpan or search on metacpan
lib/DBD/Wire10.pm view on Meta::CPAN
C<Warn> can be specified to 1 in the attribute hash to output warnings when some silly things are attempted.
C<ShowErrorStatement> can be specified to 1 in the attribute hash to include the prepared statement in output when an error occurs.
C<RaiseError> can be specified to 1 in the attribute hash to enable error handling. Use C<eval { ... };> guard blocks to catch errors. After the guard block, the special variable $@ is either undefined or contains an error message.
C<PrintError> can be specified to 1 in the attribute hash to disable error handling, and instead print a line on the console and continue execution whenever an error happens.
=head4 data_sources
Implemented, but does not return a list of databases, just a blank entry with the name of the driver.
=head2 Features in C<DBD::Wire10::db>
=head3 I<Database server connection>: methods
Some methods have default implementations in DBI, those are not listed here. Refer also to the L<DBI::DBI> documentation.
=head4 quote
Quotes a string literal.
=head4 quote_identifier
Quotes a schema identifier such as database or table names.
=head4 prepare
Given an SQL string, prepares a statement for executing.
Question marks (?) can be used in place of parameters. Actual parameters can then be added later either with a call to bind_param(), or when calling execute().
=head4 get_info
Returns various information about the database server when given a code for the particular information to retrieve.
=head4 last_insert_id
Returns the auto-increment value generated by the last INSERT statement executed.
=head4 commit
Commits the active transaction.
=head4 rollback
Rolls back the active transaction.
=head4 disconnect
Disconnects from the database server.
=head4 ping
Sends a ping over the network protocol. An error is reported via the standard DBI error mechanism if this fails.
=head4 reconnect
Makes sure that there is a connection to the database server. If there is no connection, and the attempt to reconnect fails, an error is reported via the standard DBI error reporting mechanism.
Notice that the timeout when calling this method is in a sense doubled. reconnect() first performs a ping() if the connection seems to be alive. If the ping fails after C<wire10_connect_timeout> seconds, then a new underlying connection is establis...
=head4 err
Contains an error code when an error has happened. Always use RaiseError and eval {} to catch errors in production code.
=head4 state
Contains an SQLSTATE code when an error has happened.
=head4 errstr
Contains an error message when an error has happened. Always use RaiseError and eval {} to catch errors in production code.
=head4 take_imp_data (internal)
Retrieves a reference to the core driver object and nukes the DBI handle that previously owned it.
=head3 I<Database server connection>: attributes
Some attributes have default implementations in DBI, those are not listed here. Refer also to the L<DBI::DBI> documentation.
=head4 AutoCommit
Enables or disables automatic commit after each query, in effect wrapping each query in an implicit transaction.
=head4 Warn
If enabled, warnings are emitted when unexpected things might occur.
=head4 ShowErrorStatement
If enabled, the prepared statement stored by the driver upon a call to prepare() is included in the output when an error occurs.
Using absolute notation such as C<SELECT * FROM db.table> rather than C<USE db> combined with C<SELECT * FROM table> will give more precise debug output.
=head4 wire10_connect_timeout
The timeout, in seconds, before the driver stops waiting for data from the network when connecting to a server.
=head4 wire10_query_timeout
The timeout, in seconds, before the driver stops waiting for data from the network when executing a query.
=head4 wire10_thread_id
Returns the connection id of the current connection on the server.
=head4 wire10_server_version
Returns the server version of the currently connected-to server.
=head4 wire10_debug
A debug bitmask, which when enabled will spew a lots of messages to the console. 1 shows normal debug messages, 2 shows messages flowing back and forth between client and server, and 4 shows raw TCP traffic.
=head2 Features in C<DBD::Wire10::st>
=head3 I<Statement>: methods
=head4 bind_param
( run in 1.189 second using v1.01-cache-2.11-cpan-99c4e6809bf )