⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 interbase.pm

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 PM
📖 第 1 页 / 共 3 页
字号:
=item B<RaiseError> (boolean, inherited)Implemented by DBI, no driver-specific impact.=item B<ChopBlanks> (boolean, inherited)Supported by the driver as proposed by DBI. =item B<LongReadLen> (integer, inherited)Supported by the driver as proposed by DBI.The default value is 80 bytes. =item B<LongTruncOk> (boolean, inherited)Supported by the driver as proposed by DBI.=item B<Taint> (boolean, inherited)Implemented by DBI, no driver-specific impact.=back=head1 DATABASE HANDLE OBJECTS=head2 Database Handle Methods=over 4=item B<selectrow_array>  @row_ary = $dbh->selectrow_array($statement, \%attr, @bind_values);Implemented by DBI, no driver-specific impact.=item B<selectall_arrayref>  $ary_ref = $dbh->selectall_arrayref($statement, \%attr, @bind_values);Implemented by DBI, no driver-specific impact.=item B<selectcol_arrayref>  $ary_ref = $dbh->selectcol_arrayref($statement, \%attr, @bind_values);Implemented by DBI, no driver-specific impact.=item B<prepare>  $sth = $dbh->prepare($statement, \%attr);Supported by the driver as proposed by DBI.When AutoCommit is On, this method implicitly starts a new transaction,which will be automatically committed after the following execute() or thelast fetch(), depending on the statement type. For select statements,commit automatically takes place after the last fetch(), or by explicitly calling finish() method if there are any rows remaining. For non-selectstatements, execute() will implicitly commits the transaction. =item B<prepare_cached>  $sth = $dbh->prepare_cached($statement, \%attr);Implemented by DBI, no driver-specific impact. =item B<do>  $rv  = $dbh->do($statement, \%attr, @bind_values);Supported by the driver as proposed by DBI.This should be used for non-select statements, where the driver doesn't takethe conservative prepare - execute steps, thereby speeding up the executiontime. But if this method is used with bind values, the speed advantagediminishes as this method calls prepare() for binding the placeholders.Instead of calling this method repeatedly with bind values, it would bebetter to call prepare() once, and execute() many times.See the notes for the execute method elsewhere in this document. Unlike theexecute method, currently this method doesn't return the number of affectedrows. =item B<commit>  $rc  = $dbh->commit;Supported by the driver as proposed by DBI. See also the notes about B<Transactions> elsewhere in this document. =item B<rollback>  $rc  = $dbh->rollback;Supported by the driver as proposed by DBI. See also the notes about B<Transactions> elsewhere in this document. =item B<disconnect>  $rc  = $dbh->disconnect;Supported by the driver as proposed by DBI. =item B<ping>  $rc = $dbh->ping;This driver supports the ping-method, which can be used to check the validity of a database-handle. This is especially required byC<Apache::DBI>.=item B<table_info>  $sth = $dbh->table_info;Supported by the driver as proposed by DBI. =item B<tables>  @names = $dbh->tables;Supported by the driver as proposed by DBI. =item B<type_info_all>  $type_info_all = $dbh->type_info_all;Supported by the driver as proposed by DBI. For further details concerning the InterBase specific data-types please read the L<InterBase Data Definition Guide>. =item B<type_info>  @type_info = $dbh->type_info($data_type);Implemented by DBI, no driver-specific impact. =item B<quote>  $sql = $dbh->quote($value, $data_type);Implemented by DBI, no driver-specific impact. =back=head2 Database Handle Attributes=over 4=item B<AutoCommit>  (boolean)Supported by the driver as proposed by DBI. According to the classification of DBI, InterBase is a database, in which a transaction must be explicitly started. Without starting a transaction, every change to the database becomes immediately permanent. The default of AutoCommit is on, which corresponds to the DBI's default. When setting AutoCommit to off, a transaction will be started and every commit or rollback will automatically start a new transaction. For details see the notes about B<Transactions> elsewhere in this document. =item B<Driver>  (handle)Implemented by DBI, no driver-specific impact. =item B<Name>  (string, read-only)Not yet implemented.=item B<RowCacheSize>  (integer)Implemented by DBI, not used by the driver.=item B<ib_softcommit>  (driver-specific, boolean)Set this attribute to TRUE to use InterBase's soft commit feature (defaultto FALSE). Soft commit retains the internal transaction handle whencommitting a transaction, while the default commit behavior always closesand invalidates the transaction handle.Since the transaction handle is still open, there is no need to start a new transaction upon every commit, so applications can gain performance improvement. Using soft commit is also desirable when dealing with nested statement handles under AutoCommit on. Switching the attribute's value from TRUE to FALSE will force hard commit thus closing the current transaction. =back=head1 STATEMENT HANDLE OBJECTS=head2 Statement Handle Methods=over 4=item B<bind_param>Supported by the driver as proposed by DBI. The SQL data type passed as the third argument is ignored. =item B<bind_param_inout>Not supported by this driver. =item B<execute>  $rv = $sth->execute(@bind_values);Supported by the driver as proposed by DBI. =item B<fetchrow_arrayref>  $ary_ref = $sth->fetchrow_arrayref;Supported by the driver as proposed by DBI. =item B<fetchrow_array>  @ary = $sth->fetchrow_array;Supported by the driver as proposed by DBI. =item B<fetchrow_hashref>  $hash_ref = $sth->fetchrow_hashref;Supported by the driver as proposed by DBI. =item B<fetchall_arrayref>  $tbl_ary_ref = $sth->fetchall_arrayref;Implemented by DBI, no driver-specific impact. =item B<finish>  $rc = $sth->finish;Supported by the driver as proposed by DBI. =item B<rows>  $rv = $sth->rows;Supported by the driver as proposed by DBI. It returns the number of B<fetched> rows for select statements, otherwiseit returns -1 (unknown number of affected rows).=item B<bind_col>  $rc = $sth->bind_col($column_number, \$var_to_bind, \%attr);Supported by the driver as proposed by DBI. =item B<bind_columns>  $rc = $sth->bind_columns(\%attr, @list_of_refs_to_vars_to_bind);Supported by the driver as proposed by DBI. =item B<dump_results>  $rows = $sth->dump_results($maxlen, $lsep, $fsep, $fh);Implemented by DBI, no driver-specific impact. =back=head2 Statement Handle Attributes=over 4=item B<NUM_OF_FIELDS>  (integer, read-only)Implemented by DBI, no driver-specific impact. =item B<NUM_OF_PARAMS>  (integer, read-only)Implemented by DBI, no driver-specific impact. =item B<NAME>  (array-ref, read-only)Supported by the driver as proposed by DBI. =item B<NAME_lc>  (array-ref, read-only)Implemented by DBI, no driver-specific impact. =item B<NAME_uc>  (array-ref, read-only)Implemented by DBI, no driver-specific impact. =item B<TYPE>  (array-ref, read-only)Supported by the driver as proposed by DBI, with the restriction, that the types are InterBasespecific data-types which do not correspond to international standards.=item B<PRECISION>  (array-ref, read-only)Supported by the driver as proposed by DBI. =item B<SCALE>  (array-ref, read-only)Supported by the driver as proposed by DBI. =item B<NULLABLE>  (array-ref, read-only)Supported by the driver as proposed by DBI. =item B<CursorName>  (string, read-only)Supported by the driver as proposed by DBI. =item B<Statement>  (string, read-only)Supported by the driver as proposed by DBI. =item B<RowCache>  (integer, read-only)Not supported by the driver. =back=head1 TRANSACTION SUPPORTThe transaction behavior is controlled with the attribute AutoCommit. For a complete definition of AutoCommit please refer to the DBI documentation. According to the DBI specification the default for AutoCommit is TRUE. In this mode, any change to the database becomes valid immediately. Any commit() or rollback() will be rejected. If AutoCommit is switched-off, immediately a transaction will be started.A rollback() will rollback and close the active transaction, then implicitly start a new transaction. A disconnect will issue a rollback. InterBase provides fine control over transaction behavior, where users canspecify the access mode, the isolation level, the lock resolution, and the table reservation (for a specified table). For this purpose,C<ib_set_tx_param()> database handle method is available. Upon a successful C<connect()>, these default parameter values will be usedfor every SQL operation:    Access mode:        read_write    Isolation level:    snapshot    Lock resolution:    waitAny of the above value can be changed using C<ib_set_tx_param()>.=over 4=item B<ib_set_tx_param>  $dbh->func(     -access_mode     => 'read_write',    -isolation_level => 'read_committed',    -lock_resolution => 'wait',    'ib_set_tx_param' );Valid value for C<-access_mode> is C<read_write>, or C<read_only>. Valid value for C<-lock_resolution> is C<wait>, or C<no_wait>. In Firebird 2.0, a timeout value for wait is introduced. This can be specified using hash ref as lock_resolution value: $dbh->func(    -lock_resolution => { wait => 5 }, # wait for 5 seconds    'ib_set_tx_param' );C<-isolation_level> may be: C<read_committed>, C<snapshot>,C<snapshot_table_stability>. If C<read_committed> is to be used with C<record_version> orC<no_record_version>, then they should be inside an anonymous array: $dbh->func(     -isolation_level => ['read_committed', 'record_version'],    'ib_set_tx_param' );Table reservation is supported since C<DBD::InterBase 0.30>. Names of thetables to reserve as well as their reservation params/values are specifiedinside a hashref, which is then passed as the value of C<-reserving>.The following example reserves C<foo_table> with C<read> lock and C<bar_table> with C<read> lock and C<protected> access: $dbh->func(    -access_mode     => 'read_write',    -isolation_level => 'read_committed',    -lock_resolution => 'wait',    -reserving       =>        {            foo_table => {                lock    => 'read',            },            bar_table => {                lock    => 'read',                access  => 'protected',            },        },    'ib_set_tx_param' );Possible table reservation parameters are:=over 4=item C<access> (optional)Valid values are C<shared> or C<protected>.=item C<lock> (required)Valid values are C<read> or C<write>.=backUnder C<AutoCommit> mode, invoking this method doesn't only change thetransaction parameters (as with C<AutoCommit> off), but also commits thecurrent transaction. The new transaction parameters will be used inany newly started transaction. C<ib_set_tx_param()> can also be invoked with no parameter in which it resetstransaction parameters to the default value.=back=head1 DATE, TIME, and TIMESTAMP FORMATTING SUPPORTC<DBD::InterBase> supports various formats for query results of DATE, TIME,and TIMESTAMP types. By default, it uses "%c" for TIMESTAMP, "%x" for DATE, and "%X" for TIME,and pass them to ANSI C's strftime() function to format your query results.These values are respectively stored in ib_timestampformat, ib_dateformat,and ib_timeformat attributes, and may be changed in two ways:=over =item * At $dbh levelThis replaces the default values. Example: $dbh->{ib_timestampformat} = '%m-%d-%Y %H:%M'; $dbh->{ib_dateformat} = '%m-%d-%Y'; $dbh->{ib_timeformat} = '%H:%M';=item * At $sth levelThis overrides the default values only for the currently prepared statement. Example: $attr = {    ib_timestampformat => '%m-%d-%Y %H:%M',    ib_dateformat => '%m-%d-%Y',    ib_timeformat => '%H:%M', }; # then, pass it to prepare() method. 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -