From b989320671d995af414449a82f0555c42f342369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E7=94=B0=20=E6=86=B2=E5=A4=AA=E9=83=8E?= Date: Sat, 7 Dec 2024 10:20:00 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=E6=96=B0=E8=A6=8F=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=82=B3=E3=83=94=E3=83=BC=E3=83=BB=E3=83=AA?= =?UTF-8?q?=E3=83=93=E3=82=B8=E3=83=A7=E3=83=B3=E5=A4=89=E6=9B=B4=E3=83=BB?= =?UTF-8?q?=E3=83=9B=E3=83=AF=E3=82=A4=E3=83=88=E3=82=B9=E3=83=9A=E3=83=BC?= =?UTF-8?q?=E3=82=B9=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/pdo/pdo/connect.xml | 77 +++ reference/pdo/pdo/construct.xml | 4 +- reference/pdo_dblib/pdo-dblib.xml | 167 +++++++ reference/pdo_firebird/constants.xml | 2 +- reference/pdo_firebird/pdo-firebird.xml | 210 ++++++++ .../pdo/firebird/getapiversion.xml | 54 ++ reference/pdo_mysql/configure.xml | 2 +- reference/pdo_mysql/constants.xml | 2 +- reference/pdo_mysql/pdo-mysql.xml | 473 ++++++++++++++++++ .../pdo_mysql/pdo/mysql/getwarningcount.xml | 89 ++++ reference/pdo_mysql/reference.xml | 2 +- reference/pdo_odbc/constants.xml | 2 +- reference/pdo_odbc/pdo-odbc.xml | 162 ++++++ reference/pdo_odbc/reference.xml | 2 +- .../pdo_pgsql/PDO/pgsql/copyfromarray.xml | 147 ++++++ .../pdo_pgsql/PDO/pgsql/copyfromfile.xml | 125 +++++ reference/pdo_pgsql/PDO/pgsql/copytoarray.xml | 119 +++++ reference/pdo_pgsql/PDO/pgsql/copytofile.xml | 139 +++++ .../pdo_pgsql/PDO/pgsql/escapeidentifier.xml | 113 +++++ reference/pdo_pgsql/PDO/pgsql/getnotify.xml | 135 +++++ reference/pdo_pgsql/PDO/pgsql/getpid.xml | 55 ++ reference/pdo_pgsql/PDO/pgsql/lobcreate.xml | 119 +++++ reference/pdo_pgsql/PDO/pgsql/lobopen.xml | 126 +++++ reference/pdo_pgsql/PDO/pgsql/lobunlink.xml | 102 ++++ .../pdo_pgsql/PDO/pgsql/setnoticecallback.xml | 114 +++++ .../pdo_pgsql/PDO/pgsqlCopyFromArray.xml | 3 +- reference/pdo_pgsql/PDO/pgsqlCopyFromFile.xml | 3 +- reference/pdo_pgsql/PDO/pgsqlCopyToArray.xml | 3 +- reference/pdo_pgsql/PDO/pgsqlCopyToFile.xml | 3 +- reference/pdo_pgsql/PDO/pgsqlGetNotify.xml | 3 +- reference/pdo_pgsql/PDO/pgsqlGetPid.xml | 3 +- reference/pdo_pgsql/PDO/pgsqlLOBCreate.xml | 5 +- reference/pdo_pgsql/PDO/pgsqlLOBOpen.xml | 3 +- reference/pdo_pgsql/PDO/pgsqlLOBUnlink.xml | 5 +- reference/pdo_pgsql/constants.xml | 5 +- reference/pdo_pgsql/pdo-pgsql.xml | 218 ++++++++ reference/pdo_pgsql/reference.xml | 2 +- .../pdo_sqlite/PDO/sqlite/createaggregate.xml | 288 +++++++++++ .../pdo_sqlite/PDO/sqlite/createcollation.xml | 137 +++++ .../pdo_sqlite/PDO/sqlite/createfunction.xml | 186 +++++++ .../pdo_sqlite/PDO/sqliteCreateAggregate.xml | 4 +- .../pdo_sqlite/PDO/sqliteCreateCollation.xml | 3 +- .../pdo_sqlite/PDO/sqliteCreateFunction.xml | 4 +- reference/pdo_sqlite/pdo-sqlite.xml | 200 ++++++++ reference/pdo_sqlite/reference.xml | 2 +- 45 files changed, 3577 insertions(+), 45 deletions(-) create mode 100644 reference/pdo/pdo/connect.xml create mode 100644 reference/pdo_dblib/pdo-dblib.xml create mode 100644 reference/pdo_firebird/pdo-firebird.xml create mode 100644 reference/pdo_firebird/pdo/firebird/getapiversion.xml create mode 100644 reference/pdo_mysql/pdo-mysql.xml create mode 100644 reference/pdo_mysql/pdo/mysql/getwarningcount.xml create mode 100644 reference/pdo_odbc/pdo-odbc.xml create mode 100644 reference/pdo_pgsql/PDO/pgsql/copyfromarray.xml create mode 100644 reference/pdo_pgsql/PDO/pgsql/copyfromfile.xml create mode 100644 reference/pdo_pgsql/PDO/pgsql/copytoarray.xml create mode 100644 reference/pdo_pgsql/PDO/pgsql/copytofile.xml create mode 100644 reference/pdo_pgsql/PDO/pgsql/escapeidentifier.xml create mode 100644 reference/pdo_pgsql/PDO/pgsql/getnotify.xml create mode 100644 reference/pdo_pgsql/PDO/pgsql/getpid.xml create mode 100644 reference/pdo_pgsql/PDO/pgsql/lobcreate.xml create mode 100644 reference/pdo_pgsql/PDO/pgsql/lobopen.xml create mode 100644 reference/pdo_pgsql/PDO/pgsql/lobunlink.xml create mode 100644 reference/pdo_pgsql/PDO/pgsql/setnoticecallback.xml create mode 100644 reference/pdo_pgsql/pdo-pgsql.xml create mode 100644 reference/pdo_sqlite/PDO/sqlite/createaggregate.xml create mode 100644 reference/pdo_sqlite/PDO/sqlite/createcollation.xml create mode 100644 reference/pdo_sqlite/PDO/sqlite/createfunction.xml create mode 100644 reference/pdo_sqlite/pdo-sqlite.xml diff --git a/reference/pdo/pdo/connect.xml b/reference/pdo/pdo/connect.xml new file mode 100644 index 00000000000..d5a9f72c9b1 --- /dev/null +++ b/reference/pdo/pdo/connect.xml @@ -0,0 +1,77 @@ + + + + + + + PDO::connect + Connect to a database and return a PDO subclass for drivers that support it + + + + &reftitle.description; + + public static staticPDO::connect + stringdsn + stringnullusername&null; + #[\SensitiveParameter]stringnullpassword&null; + arraynulloptions&null; + + + Creates an instance of a PDO subclass for the + database being connection if it exists, + otherwise return a generic PDO instance. + + + + + + + + + &reftitle.returnvalues; + + Returns an instance of a PDO subclass for the + corresponding PDO driver if it exists, + or a generic PDO instance. + + + + + + + + + &reftitle.seealso; + + Pdo\Dblib + Pdo\Firebird + Pdo\Mysql + Pdo\Odbc + Pdo\Pgsql + Pdo\Sqlite + PDO::__construct + + + + + diff --git a/reference/pdo/pdo/construct.xml b/reference/pdo/pdo/construct.xml index 46f475ab403..b6d294693b4 100644 --- a/reference/pdo/pdo/construct.xml +++ b/reference/pdo/pdo/construct.xml @@ -1,6 +1,6 @@ - + @@ -193,7 +193,6 @@ $dbh = new PDO($dsn, $user, $password); - - diff --git a/reference/pdo_dblib/pdo-dblib.xml b/reference/pdo_dblib/pdo-dblib.xml new file mode 100644 index 00000000000..35153e0c8c0 --- /dev/null +++ b/reference/pdo_dblib/pdo-dblib.xml @@ -0,0 +1,167 @@ + + + + + + The Pdo\Dblib class + Pdo\Dblib + + + + +
+ &reftitle.intro; + + A PDO subclass representing a connection using + the DBLib PDO driver. + +
+ + +
+ &reftitle.classsynopsis; + + + + Pdo\Dblib + + + extends + PDO + + &InheritedConstants; + + + + &Constants; + + public + const + int + Pdo\Dblib::ATTR_CONNECTION_TIMEOUT + + + public + const + int + Pdo\Dblib::ATTR_QUERY_TIMEOUT + + + public + const + int + Pdo\Dblib::ATTR_STRINGIFY_UNIQUEIDENTIFIER + + + public + const + int + Pdo\Dblib::ATTR_VERSION + + + public + const + int + Pdo\Dblib::ATTR_TDS_VERSION + + + public + const + int + Pdo\Dblib::ATTR_SKIP_EMPTY_ROWSETS + + + public + const + int + Pdo\Dblib::ATTR_DATETIME_CONVERT + + &InheritedMethods; + + + + + + + + + +
+ +
+ &reftitle.constants; + + + Pdo\Dblib::ATTR_CONNECTION_TIMEOUT + + + + + + + Pdo\Dblib::ATTR_QUERY_TIMEOUT + + + + + + + Pdo\Dblib::ATTR_STRINGIFY_UNIQUEIDENTIFIER + + + + + + + Pdo\Dblib::ATTR_VERSION + + + + + + + Pdo\Dblib::ATTR_TDS_VERSION + + + + + + + Pdo\Dblib::ATTR_SKIP_EMPTY_ROWSETS + + + + + + + Pdo\Dblib::ATTR_DATETIME_CONVERT + + + + + + +
+
+ +
+ diff --git a/reference/pdo_firebird/constants.xml b/reference/pdo_firebird/constants.xml index fee51f43319..0b0b361b7f8 100644 --- a/reference/pdo_firebird/constants.xml +++ b/reference/pdo_firebird/constants.xml @@ -1,6 +1,6 @@ -
+
&reftitle.constants; &pdo.driver-constants; diff --git a/reference/pdo_firebird/pdo-firebird.xml b/reference/pdo_firebird/pdo-firebird.xml new file mode 100644 index 00000000000..49294f32324 --- /dev/null +++ b/reference/pdo_firebird/pdo-firebird.xml @@ -0,0 +1,210 @@ + + + + + + The Pdo\Firebird class + Pdo\Firebird + + + + +
+ &reftitle.intro; + + A PDO subclass representing a connection using + the Firebird PDO driver. + +
+ + +
+ &reftitle.classsynopsis; + + + + Pdo\Firebird + + + + extends + PDO + + + &InheritedConstants; + + + + + &Constants; + + public + const + int + Pdo\Firebird::ATTR_DATE_FORMAT + + + public + const + int + Pdo\Firebird::ATTR_TIME_FORMAT + + + public + const + int + Pdo\Firebird::ATTR_TIMESTAMP_FORMAT + + + public + const + int + Pdo\Firebird::TRANSACTION_ISOLATION_LEVEL + + + public + const + int + Pdo\Firebird::READ_COMMITTED + + + public + const + int + Pdo\Firebird::REPEATABLE_READ + + + public + const + int + Pdo\Firebird::SERIALIZABLE + + + public + const + int + Pdo\Firebird::WRITABLE_TRANSACTION + + + &Methods; + + + + + &InheritedMethods; + + + + + + + + + +
+ +
+ &reftitle.constants; + + + Pdo\Firebird::ATTR_DATE_FORMAT + + + Sets the date format. + + + + + Pdo\Firebird::ATTR_TIME_FORMAT + + + Sets the time format. + + + + + Pdo\Firebird::ATTR_TIMESTAMP_FORMAT + + + Sets the timestamp format. + + + + + Pdo\Firebird::TRANSACTION_ISOLATION_LEVEL + + + Attribute to sets the transaction isolation level. + This can be one of Pdo\Firebird::READ_COMMITTED, + Pdo\Firebird::REPEATABLE_READ, + or Pdo\Firebird::SERIALIZABLE. + + + + + Pdo\Firebird::READ_COMMITTED + + + Flag denoting the ANSI transaction isolation + level is read commited. + This is the default behavior. + + + + + Pdo\Firebird::REPEATABLE_READ + + + Flag denoting the ANSI transaction isolation + level is repeatable read. + This corresponds to Firebird's "snapshot" isolation level. + + + + + Pdo\Firebird::SERIALIZABLE + + + Flag denoting the ANSI transaction isolation + level is serializable. + This corresponds to Firebird's "snapshot table stability" isolation level. + + + + + Pdo\Firebird::WRITABLE_TRANSACTION + + + Boolean attribute used to toggle the transaction access mode between + READ ONLY and READ WRITE. + By default, it is &true; indicating READ WRITE. + + + + +
+
+ + &reference.pdo-firebird.pdo.entities.firebird; + +
+ diff --git a/reference/pdo_firebird/pdo/firebird/getapiversion.xml b/reference/pdo_firebird/pdo/firebird/getapiversion.xml new file mode 100644 index 00000000000..ca061a8b2f5 --- /dev/null +++ b/reference/pdo_firebird/pdo/firebird/getapiversion.xml @@ -0,0 +1,54 @@ + + + + + + + Pdo\Firebird::getApiVersion + Get the API version + + + + &reftitle.description; + + public static intPdo\Firebird::getApiVersion + + + + Returns the Firebird API version as defined by the C constant + FB_API_VER in ibase.h. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns the FireBird API as an int. + + + + diff --git a/reference/pdo_mysql/configure.xml b/reference/pdo_mysql/configure.xml index d6652db8d3f..f190f320a7e 100644 --- a/reference/pdo_mysql/configure.xml +++ b/reference/pdo_mysql/configure.xml @@ -1,6 +1,6 @@ - +
&reftitle.install; diff --git a/reference/pdo_mysql/constants.xml b/reference/pdo_mysql/constants.xml index 5bbe515544c..8194ddde3bc 100644 --- a/reference/pdo_mysql/constants.xml +++ b/reference/pdo_mysql/constants.xml @@ -1,6 +1,6 @@ - +
&reftitle.constants; diff --git a/reference/pdo_mysql/pdo-mysql.xml b/reference/pdo_mysql/pdo-mysql.xml new file mode 100644 index 00000000000..f503b2b52ca --- /dev/null +++ b/reference/pdo_mysql/pdo-mysql.xml @@ -0,0 +1,473 @@ + + + + + + The Pdo\Mysql class + Pdo\Mysql + + + + +
+ &reftitle.intro; + + A PDO subclass representing a connection using + the MySQL PDO driver. + + + This driver supports a dedicated SQL query parser for the MySQL dialect. + It can handle the following: + + + + Single and double-quoted literals with both doubling and backslash as escaping mechanisms + + + + + Backtick literals with doubling as escaping mechanism + + + + + Two-dashes, C-style comments, and Hash-comments. + + + + +
+ + +
+ &reftitle.classsynopsis; + + + + + Pdo\Mysql + + + + extends + PDO + + + &InheritedConstants; + + + + + &Constants; + + public + const + int + Pdo\Mysql::ATTR_USE_BUFFERED_QUERY + + + public + const + int + Pdo\Mysql::ATTR_LOCAL_INFILE + + + public + const + int + Pdo\Mysql::ATTR_LOCAL_INFILE_DIRECTORY + + + public + const + int + Pdo\Mysql::ATTR_INIT_COMMAND + + + public + const + int + Pdo\Mysql::ATTR_MAX_BUFFER_SIZE + + + public + const + int + Pdo\Mysql::ATTR_READ_DEFAULT_FILE + + + public + const + int + Pdo\Mysql::ATTR_READ_DEFAULT_GROUP + + + public + const + int + Pdo\Mysql::ATTR_COMPRESS + + + public + const + int + Pdo\Mysql::ATTR_DIRECT_QUERY + + + public + const + int + Pdo\Mysql::ATTR_FOUND_ROWS + + + public + const + int + Pdo\Mysql::ATTR_IGNORE_SPACE + + + public + const + int + Pdo\Mysql::ATTR_MULTI_STATEMENTS + + + public + const + int + Pdo\Mysql::ATTR_SERVER_PUBLIC_KEY + + + public + const + int + Pdo\Mysql::ATTR_SSL_KEY + + + public + const + int + Pdo\Mysql::ATTR_SSL_CERT + + + public + const + int + Pdo\Mysql::ATTR_SSL_CA + + + public + const + int + Pdo\Mysql::ATTR_SSL_CAPATH + + + public + const + int + Pdo\Mysql::ATTR_SSL_CIPHER + + + public + const + int + Pdo\Mysql::ATTR_SSL_VERIFY_SERVER_CERT + + + &Methods; + + + + + &InheritedMethods; + + + + + + + + + +
+ +
+ &reftitle.constants; + + + Pdo\Mysql::ATTR_USE_BUFFERED_QUERY + + + By default all statements are executed in + buffered mode. + If this attribute is set to &false; on a + Pdo\Mysql object, + the MySQL driver will use the unbuffered mode. + + Setting MySQL unbuffered mode + +setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false); + +$unbufferedResult = $pdo->query("SELECT Name FROM City"); +foreach ($unbufferedResult as $row) { + echo $row['Name'] . PHP_EOL; +} +?> +]]> + + + + + + Pdo\Mysql::ATTR_LOCAL_INFILE + + + Enable LOAD LOCAL INFILE. + + + + Can only be used in the driver_options + array when constructing a new database handle. + + + + + + Pdo\Mysql::ATTR_LOCAL_INFILE_DIRECTORY + + + Allows restricting LOCAL DATA loading to files located in this + designated directory. + Available as of PHP 8.1.0. + + + + + + + + Pdo\Mysql::ATTR_INIT_COMMAND + + + Command to execute when connecting to the MySQL server. + Will automatically be re-executed when reconnecting. + + + + + + + + Pdo\Mysql::ATTR_READ_DEFAULT_FILE + + + Read options from the named option file instead of from + my.cnf. + + + + This option is not available if mysqlnd is used, + because mysqlnd does not read the mysql configuration files. + + + + + + Pdo\Mysql::ATTR_READ_DEFAULT_GROUP + + + Read options from the named group from my.cnf or + the file specified with + Pdo\Mysql::ATTR_READ_DEFAULT_FILE. + + + + This option is not available if mysqlnd is used, + because mysqlnd does not read the mysql configuration files. + + + + + + Pdo\Mysql::ATTR_COMPRESS + + + Enable network communication compression. + + + + + Pdo\Mysql::ATTR_DIRECT_QUERY + + + &Alias; PDO::ATTR_EMULATE_PREPARES. + + + + + Pdo\Mysql::ATTR_FOUND_ROWS + + + Return the number of found (matched) rows, + not the number of changed rows. + + + + + + + + Pdo\Mysql::ATTR_IGNORE_SPACE + + + Permit spaces after SQL function names. + Makes all SQL functions names reserved words. + + + + + + + + Pdo\Mysql::ATTR_MAX_BUFFER_SIZE + + + Maximum buffer size. Defaults to 1 MiB. + + + + This constant is not supported when compiled against mysqlnd. + + + + + + Pdo\Mysql::ATTR_MULTI_STATEMENTS + + + Disables multi query execution in both + PDO::prepare and + PDO::query when set to &false;. + + + + + + + + Pdo\Mysql::ATTR_SERVER_PUBLIC_KEY + + + RSA public key file used with the SHA-256 based authentication. + + + + + + + + Pdo\Mysql::ATTR_SSL_KEY + + + The file path to the SSL key. + + + + + + + + Pdo\Mysql::ATTR_SSL_CERT + + + The file path to the SSL certificate. + + + + + + + + Pdo\Mysql::ATTR_SSL_CA + + + The file path to the SSL certificate authority. + + + + + + + + Pdo\Mysql::ATTR_SSL_CAPATH + + + The file path to the directory that contains the trusted + SSL CA certificates, + which are stored in PEM format. + + + + + + + + Pdo\Mysql::ATTR_SSL_CIPHER + + + A list of one or more permissible ciphers to use for + SSL encryption, in a format understood by OpenSSL. + For example: DHE-RSA-AES256-SHA:AES128-SHA + + + + + + + + Pdo\Mysql::ATTR_SSL_VERIFY_SERVER_CERT + + + Provides a way to disable verification of the server SSL certificate. + Available as of PHP 7.0.18 and PHP 7.1.4. + + + + This option is available only with mysqlnd. + + + + + + + + +
+
+ + &reference.pdo-mysql.pdo.entities.mysql; + +
+ diff --git a/reference/pdo_mysql/pdo/mysql/getwarningcount.xml b/reference/pdo_mysql/pdo/mysql/getwarningcount.xml new file mode 100644 index 00000000000..7a42ea4eb0f --- /dev/null +++ b/reference/pdo_mysql/pdo/mysql/getwarningcount.xml @@ -0,0 +1,89 @@ + + + + + + + Pdo\Mysql::getWarningCount + Returns the number of warnings from the last executed query + + + + &reftitle.description; + + public intPdo\Mysql::getWarningCount + + + + Returns the number of warnings from the last executed query. + + + + For retrieving warning messages the following SQL command can be used: + SHOW WARNINGS [limit row_count]. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns an int representing the number of warnings generated by the last query. + + + + + &reftitle.examples; + + <methodname>Pdo\Mysql::getWarningCount</methodname> example + +query('SELECT 42/0'); +if ($conn->getWarningCount() > 0) { + $result = $conn->query("SHOW WARNINGS"); + $row = $result->fetch(); + printf("%s (%d): %s\n", $row[0], $row[1], $row[2]); +} + +?> +]]> + + &example.outputs; + + + + + + + + diff --git a/reference/pdo_mysql/reference.xml b/reference/pdo_mysql/reference.xml index f539d20e813..03cf2104f08 100644 --- a/reference/pdo_mysql/reference.xml +++ b/reference/pdo_mysql/reference.xml @@ -1,6 +1,6 @@ - + diff --git a/reference/pdo_odbc/constants.xml b/reference/pdo_odbc/constants.xml index aa4075b8ecb..fc961540563 100644 --- a/reference/pdo_odbc/constants.xml +++ b/reference/pdo_odbc/constants.xml @@ -1,6 +1,6 @@ - +
&reftitle.constants; diff --git a/reference/pdo_odbc/pdo-odbc.xml b/reference/pdo_odbc/pdo-odbc.xml new file mode 100644 index 00000000000..6d5f0a548fc --- /dev/null +++ b/reference/pdo_odbc/pdo-odbc.xml @@ -0,0 +1,162 @@ + + + + + + The Pdo\Odbc class + Pdo\Odbc + + + + +
+ &reftitle.intro; + + A PDO subclass representing a connection using + the ODBC PDO driver. + +
+ + +
+ &reftitle.classsynopsis; + + + + + Pdo\Odbc + + + + extends + PDO + + + &InheritedConstants; + + + + + &Constants; + + public + const + int + Pdo\Odbc::ATTR_USE_CURSOR_LIBRARY + + + public + const + int + Pdo\Odbc::ATTR_ASSUME_UTF8 + + + public + const + int + Pdo\Odbc::SQL_USE_IF_NEEDED + + + public + const + int + Pdo\Odbc::SQL_USE_DRIVER + + + public + const + int + Pdo\Odbc::SQL_USE_ODBC + + + &InheritedMethods; + + + + + + + + + +
+ +
+ &reftitle.constants; + + + Pdo\Odbc::ATTR_USE_CURSOR_LIBRARY + + + This option controls whether the ODBC cursor library is used. + The ODBC cursor library supports some advanced ODBC features + (e.g. block scrollable cursors), + which may not be implemented by the driver. + The following values are supported: + + + Pdo\Odbc::SQL_USE_IF_NEEDED + + + Use the ODBC cursor library when needed. + This is the default. + + + + + Pdo\Odbc::SQL_USE_DRIVER + + + Never use the ODBC cursor library. + + + + + Pdo\Odbc::SQL_USE_ODBC + + + Always use the ODBC cursor library. + + + + + + + + + Pdo\Odbc::ATTR_ASSUME_UTF8 + + + Windows only. + If &true;, UTF-16 encoded character data (CHAR, + VARCHAR and LONGVARCHAR) + is converted to UTF-8 when reading from or writing data to the database. + If &false; (the default), character encoding conversion may be done by the driver. + + + + +
+
+ +
+ diff --git a/reference/pdo_odbc/reference.xml b/reference/pdo_odbc/reference.xml index 35d8b513ba5..fe447b3bef0 100644 --- a/reference/pdo_odbc/reference.xml +++ b/reference/pdo_odbc/reference.xml @@ -1,6 +1,6 @@ - + diff --git a/reference/pdo_pgsql/PDO/pgsql/copyfromarray.xml b/reference/pdo_pgsql/PDO/pgsql/copyfromarray.xml new file mode 100644 index 00000000000..235c1882d7a --- /dev/null +++ b/reference/pdo_pgsql/PDO/pgsql/copyfromarray.xml @@ -0,0 +1,147 @@ + + + + + + + Pdo\Pgsql::copyFromArray + Copy data from a PHP array into a table + + + + &reftitle.description; + + public boolPdo\Pgsql::copyFromArray + stringtableName + arrayrows + stringseparator"\t" + stringnullAs"\\\\N" + stringnullfields&null; + + + Copies data from rows array to table + tableName using separator + as fields delimiter and fields list. + + + + + &reftitle.parameters; + + + tableName + + + String containing table name. + + + + + rows + + + An indexed array of strings with fields + separated by separator. + + + + + separator + + + Delimiter used to separate fields in an entry of the + rows array. + + + + + nullAs + + + How to interpret SQL NULL values. + + + + + fields + + + List of fields to insert. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + + + &reftitle.seealso; + + Pdo\Pgsql::copyToArray + Pdo\Pgsql::copyFromFile + Pdo\Pgsql::copyToFile + + + + + diff --git a/reference/pdo_pgsql/PDO/pgsql/copyfromfile.xml b/reference/pdo_pgsql/PDO/pgsql/copyfromfile.xml new file mode 100644 index 00000000000..0f4b2116c9c --- /dev/null +++ b/reference/pdo_pgsql/PDO/pgsql/copyfromfile.xml @@ -0,0 +1,125 @@ + + + + + + + Pdo\Pgsql::copyFromFile + Copy data from file into table + + + + &reftitle.description; + + public boolPdo\Pgsql::copyFromFile + stringtableName + stringfilename + stringseparator"\t" + stringnullAs"\\\\N" + stringnullfields&null; + + + Copies data from file specified by filename + into table tableName using + separator as fields delimiter and fields list + + + + + &reftitle.parameters; + + + + + + filename + + + Filename containing the data to import. + + + + + + + + + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + + + &reftitle.seealso; + + Pdo\Pgsql::copyToFile + Pdo\Pgsql::copyFromArray + Pdo\Pgsql::copyToArray + + + + + diff --git a/reference/pdo_pgsql/PDO/pgsql/copytoarray.xml b/reference/pdo_pgsql/PDO/pgsql/copytoarray.xml new file mode 100644 index 00000000000..34c5e8d78ba --- /dev/null +++ b/reference/pdo_pgsql/PDO/pgsql/copytoarray.xml @@ -0,0 +1,119 @@ + + + + + + + Pdo\Pgsql::copyToArray + Copy data from database table into PHP array + + + + &reftitle.description; + + public arrayfalsePdo\Pgsql::copyToArray + stringtableName + stringseparator"\t" + stringnullAs"\\\\N" + stringnullfields&null; + + + Copies data from tableName into array using delimiter as fields delimiter and fields list + + + + + &reftitle.parameters; + + + + + + + + + + + + fields + + + List of fields to export. + + + + + + + + &reftitle.returnvalues; + + Returns an array of rows,&return.falseforfailure;. + + + + + + + + + &reftitle.seealso; + + Pdo\Pgsql::copyFromArray + Pdo\Pgsql::copyFromFile + Pdo\Pgsql::copyToFile + + + + + diff --git a/reference/pdo_pgsql/PDO/pgsql/copytofile.xml b/reference/pdo_pgsql/PDO/pgsql/copytofile.xml new file mode 100644 index 00000000000..782185a1f39 --- /dev/null +++ b/reference/pdo_pgsql/PDO/pgsql/copytofile.xml @@ -0,0 +1,139 @@ + + + + + + + Pdo\Pgsql::copyToFile + Copy data from table into file + + + + &reftitle.description; + + public boolPdo\Pgsql::copyToFile + stringtableName + stringfilename + stringseparator"\t" + stringnullAs"\\\\N" + stringnullfields&null; + + + Copies data from table into file specified by filename + using separator as fields delimiter and + fields list. + + + + + &reftitle.parameters; + + + + + + filename + + + Filename to export data. + + + + + + + + + + + fields + + + List of fields to insert. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + + + &reftitle.seealso; + + Pdo\Pgsql::copyFromFile + Pdo\Pgsql::copyFromArray + Pdo\Pgsql::copyToArray + + + + + diff --git a/reference/pdo_pgsql/PDO/pgsql/escapeidentifier.xml b/reference/pdo_pgsql/PDO/pgsql/escapeidentifier.xml new file mode 100644 index 00000000000..d141f3e8fff --- /dev/null +++ b/reference/pdo_pgsql/PDO/pgsql/escapeidentifier.xml @@ -0,0 +1,113 @@ + + + + + + + Pdo\Pgsql::escapeIdentifier + Escapes a string for use as an SQL identifier + + + + &reftitle.description; + + public stringPdo\Pgsql::escapeIdentifier + stringinput + + + Escapes a string for use as an SQL identifier, such as a table, column, or function name. + This is useful when a user-supplied identifier might contain special characters + that would otherwise not be interpreted as part of the identifier by the SQL parser, + or when the identifier might contain upper case characters whose case should be preserved. + + + + + &reftitle.parameters; + + + input + + + A string containing text to be escaped. + + + + + + + + &reftitle.returnvalues; + + A string containing the escaped data. + + + + + &reftitle.examples; + + <methodname>Pdo\Pgsql::escapeIdentifier</methodname> example + +exec("CREATE TABLE $unescapedTableName ()"); + +$escapedTableName = $pdo->escapeIdentifier('EscapedTableName'); +$pdo->exec("CREATE TABLE $escapedTableName ()"); + +$statement = $pdo->query( + "SELECT relname FROM pg_stat_user_tables WHERE relname ilike '%tablename'" +); + +var_export($statement->fetchAll(PDO::FETCH_COLUMN, 0)); + +$tableNameWithSymbols = 'Table-Name-With-Symbols'; +$pdo->exec("CREATE TABLE $tableNameWithSymbols ()"); +?> +]]> + + &example.outputs.similar; + + 'unescapedtablename', + 1 => 'EscapedTableName', +) +Fatal error: Uncaught PDOException: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "Table" +LINE 1: CREATE TABLE Table-Name-With-Symbols () +]]> + + + + + + &reftitle.seealso; + + PDO::quote + + + + + diff --git a/reference/pdo_pgsql/PDO/pgsql/getnotify.xml b/reference/pdo_pgsql/PDO/pgsql/getnotify.xml new file mode 100644 index 00000000000..3e353e6cd97 --- /dev/null +++ b/reference/pdo_pgsql/PDO/pgsql/getnotify.xml @@ -0,0 +1,135 @@ + + + + + + + Pdo\Pgsql::getNotify + Get asynchronous notification + + + + &reftitle.description; + + public arrayfalsePdo\Pgsql::getNotify + intfetchModePDO::FETCH_DEFAULT + inttimeoutMilliseconds0 + + + Returns a result set representing a pending asynchronous notification. + + + + + &reftitle.parameters; + + + fetchMode + + + The format the result set should be returned as, + one of the following constants: + + PDO::FETCH_DEFAULT + PDO::FETCH_BOTH + PDO::FETCH_ASSOC + PDO::FETCH_NUM + + + + + + timeoutMilliseconds + + + The length of time to wait for a response, in milliseconds. + + + + + + + + &reftitle.returnvalues; + + If one or more notifications is pending, returns a single row, + with fields message and pid, + otherwise returns &false;. + + + + + &reftitle.errors; + + A ValueError is thrown if + fetchMode is not one of the valid + PDO::FETCH_* + constants. + + + A ValueError is thrown if + timeoutMilliseconds is less than 0. + + + A E_WARNING is raised when + timeoutMilliseconds is greater than the value + that can be contained in a signed 32-bit integer, in which case it will be + the maximum value of a signed 32-bit integer. + + + + + + + &reftitle.seealso; + + PDO::query + PDOStatement::fetch + PDOStatement::fetchAll + + + + + diff --git a/reference/pdo_pgsql/PDO/pgsql/getpid.xml b/reference/pdo_pgsql/PDO/pgsql/getpid.xml new file mode 100644 index 00000000000..5be3bb55df9 --- /dev/null +++ b/reference/pdo_pgsql/PDO/pgsql/getpid.xml @@ -0,0 +1,55 @@ + + + + + + + Pdo\Pgsql::getPid + Get the PID of the backend process handling this connection + + + + &reftitle.description; + + public intPdo\Pgsql::getPid + + + + Returns the PID of the backend process handling this connection. + Note that the PID belongs to a process executing on the database server host, + not the local host. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns the PID as an int. + + + + diff --git a/reference/pdo_pgsql/PDO/pgsql/lobcreate.xml b/reference/pdo_pgsql/PDO/pgsql/lobcreate.xml new file mode 100644 index 00000000000..a95420eeda9 --- /dev/null +++ b/reference/pdo_pgsql/PDO/pgsql/lobcreate.xml @@ -0,0 +1,119 @@ + + + + + + + Pdo\Pgsql::lobCreate + Creates a new large object + + + + &reftitle.description; + + public stringfalsePdo\Pgsql::lobCreate + + + + Pdo\Pgsql::lobCreate creates a large object + and returns the OID which refers to it. + It can be opened to read or write data with + Pdo\Pgsql::lobOpen. + + + The OID can be stored in columns of type OID and be used to reference + the large object, without causing the row to grow arbitrarily large. + The large object will continue to live in the database until it + is removed by calling Pdo\Pgsql::lobUnlink. + + + Large objects are cumbersome to use. + Indeed, it is required that Pdo\Pgsql::lobUnlink + is called prior to deleting the last row referencing the OID in the entire database; + otherwise, unreferenced large objects will remain on the server indefinitely. + Moreover, large objects have no access controls. + An alternative is the bytea column type, which can be up to 1GB in size, + and this column type transparently manages the storage for optimal row size. + + + + This function, and all manipulations of the large object, + must be called and carried out within a transaction. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns the OID of the newly created large object on success, + &return.falseforfailure;. + + + + + &reftitle.examples; + + <methodname>Pdo\Pgsql::lobCreate</methodname> example + + This example creates a new large object and copies the contents + of a file into it. + The OID is then stored into a table. + + +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); +$db->beginTransaction(); +$oid = $db->lobCreate(); +$stream = $db->lobOpen($oid, 'w'); +$local = fopen($filename, 'rb'); +stream_copy_to_stream($local, $stream); +$local = null; +$stream = null; +$stmt = $db->prepare("INSERT INTO BLOBS (ident, oid) VALUES (?, ?)"); +$stmt->execute([$some_id, $oid]); +$db->commit(); +?> +]]> + + + + + + &reftitle.seealso; + + Pdo\Pgsql::lobOpen + Pdo\Pgsql::lobUnlink + pg_lo_create + pg_lo_open + + + + + diff --git a/reference/pdo_pgsql/PDO/pgsql/lobopen.xml b/reference/pdo_pgsql/PDO/pgsql/lobopen.xml new file mode 100644 index 00000000000..6ed3b14889e --- /dev/null +++ b/reference/pdo_pgsql/PDO/pgsql/lobopen.xml @@ -0,0 +1,126 @@ + + + + + + + Pdo\Pgsql::lobOpen + Opens an existing large object stream + + + + &reftitle.description; + + public resourcefalsePdo\Pgsql::lobOpen + stringoid + stringmode"rb" + + + Pdo\Pgsql::lobOpen opens a stream to access + the data referenced by oid. + All usual filesystem functions, such as fread, + fwrite or fgets can be used + to manipulate the contents of the stream. + + + + + + + + &reftitle.parameters; + + + oid + + + A large object identifier. + + + + + mode + + + If mode is r, open the stream for reading. + If mode is w, open the stream for writing. + + + + + + + + &reftitle.returnvalues; + + Returns a stream resource on success,&return.falseforfailure;. + + + + + &reftitle.errors; + + When does this function issue E_* level errors, + and/or throw Exceptions. + + + + + &reftitle.examples; + + <methodname>Pdo\Pgsql::lobOpen</methodname> example + + Following on from the Pdo\Pgsql::lobCreate + example, this code snippet retrieves the large object from + the database and outputs it to the browser. + + +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); +$db->beginTransaction(); +$stmt = $db->prepare("SELECT oid FROM BLOBS WHERE ident = ?"); +$stmt->execute(array($some_id)); +$stmt->bindColumn('oid', $oid, PDO::PARAM_STR); +$stmt->fetch(PDO::FETCH_BOUND); +$stream = $db->pgsqlLOBOpen($oid, 'r'); +header("Content-type: application/octet-stream"); +fpassthru($stream); +?> +]]> + + + + + + &reftitle.seealso; + + Pdo\Pgsql::lobCreate + Pdo\Pgsql::lobUnlink + pg_lo_create + pg_lo_open + + + + + diff --git a/reference/pdo_pgsql/PDO/pgsql/lobunlink.xml b/reference/pdo_pgsql/PDO/pgsql/lobunlink.xml new file mode 100644 index 00000000000..1b910c0ce08 --- /dev/null +++ b/reference/pdo_pgsql/PDO/pgsql/lobunlink.xml @@ -0,0 +1,102 @@ + + + + + + + Pdo\Pgsql::lobUnlink + Deletes the large object + + + + &reftitle.description; + + public boolPdo\Pgsql::lobUnlink + stringoid + + + Deletes a large object from the database identified by OID. + + + + + + + + &reftitle.parameters; + + + oid + + + A large object identifier. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; + + <methodname>Pdo\Pgsql::lobUnlink</methodname> example + + This example unlinks a large object from the database prior to deleting + the row that references it from the blobs table are used in the examples of + Pdo\Pgsql::lobCreate and + Pdo\Pgsql::lobOpen. + + +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); +$db->beginTransaction(); +$db->pgsqlLOBUnlink($oid); +$stmt = $db->prepare("DELETE FROM BLOBS where ident = ?"); +$stmt->execute(array($some_id)); +$db->commit(); +?> +]]> + + + + + + &reftitle.seealso; + + Pdo\Pgsql::lobCreate + Pdo\Pgsql::lobOpen + pg_lo_create + pg_lo_open + + + + + diff --git a/reference/pdo_pgsql/PDO/pgsql/setnoticecallback.xml b/reference/pdo_pgsql/PDO/pgsql/setnoticecallback.xml new file mode 100644 index 00000000000..ba2a55b553c --- /dev/null +++ b/reference/pdo_pgsql/PDO/pgsql/setnoticecallback.xml @@ -0,0 +1,114 @@ + + + + + + + Pdo\Pgsql::setNoticeCallback + Set a callback to handle notice and warning messages generated by the backend + + + + &reftitle.description; + + public voidPdo\Pgsql::setNoticeCallback + callablenullcallback + + + Set a callback to handle notice and warning messages generated by the backend. + This includes messages emitted by PostgreSQL itself, + as well as those raised by user-defined SQL functions using RAISE. + Please note that the actual receipt of these messages + depends on the backend setting client_min_messages. + + + + + &reftitle.parameters; + + + callback + + + If &null; is passed, the handler is reset to its default state. + + + Otherwise, the handler is a callback with the following signature: + + voidhandler + stringmessage + + + + message + + + A message generated by the backend. + + + + + + + + + + + + &reftitle.returnvalues; + + &return.void; + + + + + &reftitle.examples; + + <methodname>Pdo\Pgsql::setNoticeCallback</methodname> example + +exec('CREATE TABLE parent(id int primary key)'); +$pdo->exec('CREATE TABLE child(id int references parent)'); + +$pdo->setNoticeCallback(function ($message) { + echo $message; +}); + +$pdo->exec('TRUNCATE parent CASCADE'); +?> +]]> + + &example.outputs.similar; + + + + + + + + diff --git a/reference/pdo_pgsql/PDO/pgsqlCopyFromArray.xml b/reference/pdo_pgsql/PDO/pgsqlCopyFromArray.xml index c55ebc98396..f873b8e17c5 100644 --- a/reference/pdo_pgsql/PDO/pgsqlCopyFromArray.xml +++ b/reference/pdo_pgsql/PDO/pgsqlCopyFromArray.xml @@ -1,6 +1,6 @@ - + PDO::pgsqlCopyFromArray @@ -78,7 +78,6 @@ - - + PDO::pgsqlCopyFromFile @@ -78,7 +78,6 @@ - - + PDO::pgsqlCopyToArray @@ -69,7 +69,6 @@ - - + PDO::pgsqlCopyToFile @@ -78,7 +78,6 @@ - - + PDO::pgsqlGetNotify @@ -52,7 +52,6 @@ - - + PDO::pgsqlGetPid @@ -29,7 +29,6 @@ - - + PDO::pgsqlLOBCreate @@ -95,10 +95,7 @@ $db->commit(); - - - - + PDO::pgsqlLOBOpen @@ -106,7 +106,6 @@ fpassthru($stream); - - + PDO::pgsqlLOBUnlink @@ -81,10 +81,7 @@ $db->commit(); - - - - +
&reftitle.constants; &pdo.driver-constants; - PDO::PGSQL_ATTR_DISABLE_PREPARES @@ -35,10 +34,8 @@ -
- + + + + The Pdo\pgsql class + Pdo\pgsql + + + + +
+ &reftitle.intro; + + A PDO subclass representing a connection using + the PostgreSQL PDO driver. + + + This driver supports a dedicated SQL query parser for the PostgreSQL dialect. + It can handle the following: + + + + Single and double-quoted literals, with doubling as escaping mechanism + + + + + C-style “escape” string literals + + + + + Dollar-quoted string literals + + + + + Two-dashes and C-style comments (non-nested). + + + + + Support for ?? as escape sequence for the + ? operator. + + + + +
+ + +
+ &reftitle.classsynopsis; + + + + + Pdo\Pgsql + + + + extends + PDO + + + &InheritedConstants; + + + + + &Constants; + + public + const + int + Pdo\Pgsql::ATTR_DISABLE_PREPARES + + + public + const + int + Pdo\Pgsql::ATTR_RESULT_MEMORY_SIZE + + + public + const + int + Pdo\Pgsql::TRANSACTION_IDLE + + + public + const + int + Pdo\Pgsql::TRANSACTION_ACTIVE + + + public + const + int + Pdo\Pgsql::TRANSACTION_INTRANS + + + public + const + int + Pdo\Pgsql::TRANSACTION_INERROR + + + public + const + int + Pdo\Pgsql::TRANSACTION_UNKNOWN + + + &Methods; + + + + + &InheritedMethods; + + + + + + + + + +
+ +
+ &reftitle.constants; + + + Pdo\Pgsql::ATTR_DISABLE_PREPARES + + + Send the query and the parameters to the server together in a single + call, avoiding the need to create a named prepared statement separately. + If the query is only going to be executed once this can reduce latency by + avoiding an unnecessary server round-trip. + + + + + Pdo\Pgsql::ATTR_RESULT_MEMORY_SIZE + + + Returns the amount of memory, in bytes, allocated to the specified + query result PDOStatement instance, + or &null; if no results exist before the query is executed. + + + + + Pdo\Pgsql::TRANSACTION_IDLE + + + + + + + Pdo\Pgsql::TRANSACTION_ACTIVE + + + + + + + Pdo\Pgsql::TRANSACTION_INTRANS + + + + + + + Pdo\Pgsql::TRANSACTION_INERROR + + + + + + + Pdo\Pgsql::TRANSACTION_UNKNOWN + + + + + + +
+
+ + &reference.pdo-pgsql.pdo.entities.pgsql; + +
+ diff --git a/reference/pdo_pgsql/reference.xml b/reference/pdo_pgsql/reference.xml index 9ca39c22782..0f01aa4131a 100644 --- a/reference/pdo_pgsql/reference.xml +++ b/reference/pdo_pgsql/reference.xml @@ -1,6 +1,6 @@ - + diff --git a/reference/pdo_sqlite/PDO/sqlite/createaggregate.xml b/reference/pdo_sqlite/PDO/sqlite/createaggregate.xml new file mode 100644 index 00000000000..ffe8e5394b8 --- /dev/null +++ b/reference/pdo_sqlite/PDO/sqlite/createaggregate.xml @@ -0,0 +1,288 @@ + + + + + + + Pdo\Sqlite::createAggregate + + Registers an aggregating user-defined function for use in SQL statements + + + + + &reftitle.description; + + public boolPdo\Sqlite::createAggregate + stringname + callablestep + callablefinalize + intnumArgs-1 + + + This method is similar to Pdo\Sqlite::createFunction + except that it registers functions that can be used to calculate a + result aggregated across all the rows of a query. + + + The key difference between this method and + Pdo\Sqlite::createFunction + is that two functions are required to manage the aggregate. + + + + By using this method it is possible to override native SQL functions. + + + + + + &reftitle.parameters; + + + name + + + The name of the function used in SQL statements. + + + + + step + + + Callback function called for each row of the result set. + The callback should accumulate the result and store it in the aggregation context. + + + This function need to be defined as: + + mixedstep + mixedcontext + intrownumber + mixedvalue + mixedvalues + + + + context + + + &null; for the first row; on subsequent rows it will have the value + that was previously returned from the step function; you should use + this to maintain the aggregate state. + + + + + rownumber + + + The current row number. + + + + + value + + + The first argument passed to the aggregate. + + + + + values + + + Further arguments passed to the aggregate. + + + + + The return value of this function will be used as the + context argument in the next call of the step or + finalize functions. + + + + + finalize + + + Callback function to aggregate the "stepped" data from each row. + Once all the rows have been processed, this function will be called, + and it should then take the data from the aggregation context and return the result. + This callback function should return a type understood by SQLite + (i.e. scalar type). + + + This function need to be defined as: + + mixedfini + mixedcontext + introwcount + + + + context + + + Holds the return value from the very last call to the step function. + + + + + rowcount + + + Holds the number of rows over which the aggregate was performed. + + + + + The return value of this function will be used as the return value for + the aggregate. + + + + + numArgs + + + Hint to the SQLite parser if the callback function accepts a + predetermined number of arguments. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; + + <methodname>Pdo\Sqlite::createAggregate</methodname> example + + In this example we will create a custom aggregate function named + max_length that can be used in SQL queries. + + + In this example, we are creating an aggregating function, + named max_length, that will calculate the length + of the longest string in one of the columns of the table. + For each row, the max_len_step function is called and + passed a $context parameter. + The context parameter is just like any other PHP variable and be set to + hold an array or even an object. + In this example, we are using it to hold the maximum length we have seen so far; + if the $string has a length longer than the current maximum, + we update the context to hold this new maximum length. + + + After all the rows have been processed, + SQLite calls the max_len_finalize function to determine + the aggregate result. + It is possible to perform some kind of calculation based on the data in $context. + In this basic example the result was calculated as the query progressed, + thus so the context value can be directly returned. + + +exec("CREATE TABLE strings(a)"); +$insert = $db->prepare('INSERT INTO strings VALUES (?)'); +foreach ($data as $str) { + $insert->execute(array($str)); +} +$insert = null; + +function max_len_step($context, $row_number, $string) +{ + if (strlen($string) > $context) { + $context = strlen($string); + } + return $context; +} + +function max_len_finalize($context, $row_count) +{ + return $context === null ? 0 : $context; +} + +$db->createAggregate('max_len', 'max_len_step', 'max_len_finalize'); + +var_dump($db->query('SELECT max_len(a) from strings')->fetchAll()); + +?> +]]> + + + + + It is NOT recommended for you to store a copy of the values in the context + and then process them at the end, as you would cause SQLite to use a lot of + memory to process the query - just think of how much memory you would need + if a million rows were stored in memory, each containing a string 32 bytes + in length. + + + + + + + &reftitle.seealso; + + Pdo\Sqlite::createFunction + Pdo\Sqlite::createCollation + sqlite_create_function + sqlite_create_aggregate + + + + + diff --git a/reference/pdo_sqlite/PDO/sqlite/createcollation.xml b/reference/pdo_sqlite/PDO/sqlite/createcollation.xml new file mode 100644 index 00000000000..70208d81d74 --- /dev/null +++ b/reference/pdo_sqlite/PDO/sqlite/createcollation.xml @@ -0,0 +1,137 @@ + + + + + + + Pdo\Sqlite::createCollation + + Registers a user-defined function for use as a collating function in SQL statements + + + + + &reftitle.description; + + public boolPdo\Sqlite::createCollation + stringname + callablecallback + + + This method is similar to Pdo\Sqlite::createFunction + except that it registers functions that are used to collate strings. + + + + + &reftitle.parameters; + + + name + + + Name of the SQL collating function to be created or redefined. + + + + + callback + + + Callback function that defines the behaviour of a collation. + It must accept two strings and return + -1, 0, or 1 + if the first string sorts before, sorts identically, or sorts after + the second string respectively. + An internal function that behaves like this is strcmp. + + + This function need to be defined as: + + intcollation + stringstring1 + stringstring2 + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; + + <methodname>Pdo\Sqlite::createCollation</methodname> example + +exec("CREATE TABLE test (col1 string)"); +$db->exec("INSERT INTO test VALUES ('a1')"); +$db->exec("INSERT INTO test VALUES ('a10')"); +$db->exec("INSERT INTO test VALUES ('a2')"); + +$db->sqliteCreateCollation('NATURAL_CMP', 'strnatcmp'); +foreach ($db->query("SELECT col1 FROM test ORDER BY col1") as $row) { + echo $row['col1'] . "\n"; +} +echo "\n"; +foreach ($db->query("SELECT col1 FROM test ORDER BY col1 COLLATE NATURAL_CMP") as $row) { + echo $row['col1'] . "\n"; +} +?> +]]> + + &example.outputs; + + + + + + + + &reftitle.seealso; + + Pdo\Sqlite::createFunction + Pdo\Sqlite::createAggregate + sqlite_create_function + sqlite_create_aggregate + + + + + diff --git a/reference/pdo_sqlite/PDO/sqlite/createfunction.xml b/reference/pdo_sqlite/PDO/sqlite/createfunction.xml new file mode 100644 index 00000000000..b98a8bc81ac --- /dev/null +++ b/reference/pdo_sqlite/PDO/sqlite/createfunction.xml @@ -0,0 +1,186 @@ + + + + + + + Pdo\Sqlite::createFunction + + Registers a user-defined function for use in SQL statements + + + + + &reftitle.description; + + public boolPdo\Sqlite::createFunction + stringfunction_name + callablecallback + intnum_args-1 + intflags0 + + + This method allows PHP function to be registered with SQLite as a + user-defined function, so that it can be called within SQL queries. + The defined function can be used in any SQL query that allows function calls, + for example SELECT, UPDATE, or triggers. + + + + By using this method it is possible to override native SQL functions. + + + + + + &reftitle.parameters; + + + function_name + + + The name of the function used in SQL statements. + + + + + callback + + + Callback function to handle the defined SQL function. + + + + Callback functions should return a type understood by SQLite (i.e. + scalar type). + + + + This function need to be defined as: + + mixedcallback + mixedvalue + mixedvalues + + + + value + + + The first argument passed to the SQL function. + + + + + values + + + Further arguments passed to the SQL function. + + + + + + + + + num_args + + + The number of arguments that the SQL function takes. + If this parameter is -1, + then the SQL function may take any number of arguments. + + + + + flags + + + A bitmask of flags. + Currently, only Pdo\Sqlite::DETERMINISTIC is supported, + which specifies that the function always returns the same result given + the same inputs within a single SQL statement. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; + + <methodname>Pdo\Sqlite::createFunction</methodname> example + + In this example, we have a function that calculates the SHA256 sum of a + string, and then reverses it. When the SQL statement executes, it + returns the value of the filename transformed by our function. + The data returned in $rows contains the processed result. + + + The beauty of this technique is that there is no need to process the + result using a &foreach; loop after the query. + + +sqliteCreateFunction('sha256rev', 'sha256_and_reverse', 1); +$rows = $db->query('SELECT sha256rev(filename) FROM files')->fetchAll(); +?> +]]> + + + + + + + &reftitle.seealso; + + Pdo\Sqlite::createAggregate + Pdo\Sqlite::createCollation + sqlite_create_function + sqlite_create_aggregate + + + + + diff --git a/reference/pdo_sqlite/PDO/sqliteCreateAggregate.xml b/reference/pdo_sqlite/PDO/sqliteCreateAggregate.xml index 676aa92a3bf..4270432d820 100644 --- a/reference/pdo_sqlite/PDO/sqliteCreateAggregate.xml +++ b/reference/pdo_sqlite/PDO/sqliteCreateAggregate.xml @@ -1,6 +1,6 @@ - + @@ -255,9 +255,7 @@ var_dump($db->query('SELECT max_len(a) from strings')->fetchAll()); - - - + PDO::sqliteCreateCollation @@ -104,7 +104,6 @@ a10 - - + @@ -213,9 +213,7 @@ $rows = $db->query("SELECT php('md5', filename) from files")->fetchAll(); - - + + + + The Pdo\Sqlite class + Pdo\Sqlite + + + + +
+ &reftitle.intro; + + A PDO subclass representing a connection using + the SQLite PDO driver. + + + This driver supports a dedicated SQL query parser for the SQLite dialect. + It can handle the following: + + + + Single, double-quoted, and backtick literals, with doubling as escaping mechanism. + + + + + Square brackets quoting for identifiers. + + + + + Two-dashes and C-style comments (non-nested). + + + + +
+ + +
+ &reftitle.classsynopsis; + + + + + Pdo\Sqlite + + + + extends + PDO + + + &InheritedConstants; + + + + + &Constants; + + public + const + int + Pdo\Sqlite::DETERMINISTIC + + + public + const + int + Pdo\Sqlite::OPEN_READONLY + + + public + const + int + Pdo\Sqlite::OPEN_READWRITE + + + public + const + int + Pdo\Sqlite::OPEN_CREATE + + + public + const + int + Pdo\Sqlite::ATTR_OPEN_FLAGS + + + public + const + int + Pdo\Sqlite::ATTR_READONLY_STATEMENT + + + public + const + int + Pdo\Sqlite::ATTR_EXTENDED_RESULT_CODES + + + &Methods; + + + + + &InheritedMethods; + + + + + + + + + +
+ +
+ &reftitle.constants; + + + Pdo\Sqlite::DETERMINISTIC + + + + + + + Pdo\Sqlite::OPEN_READONLY + + + + + + + Pdo\Sqlite::OPEN_READWRITE + + + + + + + Pdo\Sqlite::OPEN_CREATE + + + + + + + Pdo\Sqlite::ATTR_OPEN_FLAGS + + + + + + + Pdo\Sqlite::ATTR_READONLY_STATEMENT + + + + + + + Pdo\Sqlite::ATTR_EXTENDED_RESULT_CODES + + + + + + +
+
+ + &reference.pdo-sqlite.pdo.entities.sqlite; + +
+ diff --git a/reference/pdo_sqlite/reference.xml b/reference/pdo_sqlite/reference.xml index 0d5686002cc..d2c940e3d9d 100644 --- a/reference/pdo_sqlite/reference.xml +++ b/reference/pdo_sqlite/reference.xml @@ -1,6 +1,6 @@ - + From 32c8ae9ff46d5e0f471716392e60d166b583ae27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E7=94=B0=20=E6=86=B2=E5=A4=AA=E9=83=8E?= Date: Sat, 7 Dec 2024 10:46:23 +0900 Subject: [PATCH 2/5] =?UTF-8?q?reference=E3=81=AE=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/pdo_firebird/constants.xml | 2 +- reference/pdo_mysql/constants.xml | 2 +- reference/pdo_mysql/reference.xml | 3 ++- reference/pdo_odbc/constants.xml | 2 +- reference/pdo_odbc/reference.xml | 3 ++- reference/pdo_pgsql/constants.xml | 2 +- reference/pdo_pgsql/reference.xml | 8 ++++---- reference/pdo_sqlite/reference.xml | 3 ++- 8 files changed, 14 insertions(+), 11 deletions(-) diff --git a/reference/pdo_firebird/constants.xml b/reference/pdo_firebird/constants.xml index 0b0b361b7f8..fee51f43319 100644 --- a/reference/pdo_firebird/constants.xml +++ b/reference/pdo_firebird/constants.xml @@ -1,6 +1,6 @@ -
+
&reftitle.constants; &pdo.driver-constants; diff --git a/reference/pdo_mysql/constants.xml b/reference/pdo_mysql/constants.xml index 8194ddde3bc..e55db2e8361 100644 --- a/reference/pdo_mysql/constants.xml +++ b/reference/pdo_mysql/constants.xml @@ -2,7 +2,7 @@ -
+
&reftitle.constants; &pdo.driver-constants; diff --git a/reference/pdo_mysql/reference.xml b/reference/pdo_mysql/reference.xml index 03cf2104f08..9836770135d 100644 --- a/reference/pdo_mysql/reference.xml +++ b/reference/pdo_mysql/reference.xml @@ -8,7 +8,7 @@ MySQL (PDO) -
+
&reftitle.intro; PDO_MYSQL は、PHP から MySQL データベースへのアクセスを可能にするための @@ -181,6 +181,7 @@ mysql:unix_socket=/tmp/mysql.sock;dbname=testdb + &reference.pdo-mysql.pdo-mysql; -
+
&reftitle.constants; &pdo.driver-constants; diff --git a/reference/pdo_odbc/reference.xml b/reference/pdo_odbc/reference.xml index fe447b3bef0..0c7d286e45e 100644 --- a/reference/pdo_odbc/reference.xml +++ b/reference/pdo_odbc/reference.xml @@ -9,7 +9,7 @@ ODBC and DB2 (PDO) -
+
&reftitle.intro; PDO_ODBC は PHP @@ -170,6 +170,7 @@ odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\\db.mdb;Uid=Admin + &reference.pdo-odbc.pdo-odbc; -
+
&reftitle.constants; &pdo.driver-constants; diff --git a/reference/pdo_pgsql/reference.xml b/reference/pdo_pgsql/reference.xml index 0f01aa4131a..8e0b45cd598 100644 --- a/reference/pdo_pgsql/reference.xml +++ b/reference/pdo_pgsql/reference.xml @@ -8,7 +8,7 @@ PostgreSQL (PDO) -
+
&reftitle.intro; PDO_PGSQL は、PHP から PostgreSQL @@ -18,7 +18,7 @@
-
+
&reftitle.resources; この拡張モジュールでは、ストリームリソースを定義しています。これは @@ -29,7 +29,7 @@ &reference.pdo-pgsql.configure; &reference.pdo-pgsql.constants; -
+
General notes @@ -157,7 +157,7 @@ pgsql:host=/tmp;port=5432;dbname=testdb;user=bruce;password=mypass &reference.pdo-pgsql.entities.PDO; - + &reference.pdo-pgsql.pdo-pgsql; - The Pdo\Dblib class + Pdo\Dblib クラス Pdo\Dblib @@ -12,8 +12,7 @@
&reftitle.intro; - A PDO subclass representing a connection using - the DBLib PDO driver. + DBLib PDO ドライバによる接続を示す PDO サブクラスです。
diff --git a/reference/pdo_firebird/constants.xml b/reference/pdo_firebird/constants.xml index fee51f43319..65d984f4406 100644 --- a/reference/pdo_firebird/constants.xml +++ b/reference/pdo_firebird/constants.xml @@ -11,7 +11,7 @@ - Pdo\Firebird::ATTR_DATE_FORMAT &Alias;。 + Pdo\Firebird::ATTR_DATE_FORMAT &Alias; @@ -22,7 +22,7 @@ - Pdo\Firebird::ATTR_DATE_FORMAT &Alias;。 + Pdo\Firebird::ATTR_TIME_FORMAT &Alias; @@ -33,7 +33,7 @@ - Pdo\Firebird::ATTR_TIMESTAMP_FORMAT &Alias;。 + Pdo\Firebird::ATTR_TIMESTAMP_FORMAT &Alias; diff --git a/reference/pdo_firebird/pdo-firebird.xml b/reference/pdo_firebird/pdo-firebird.xml index 49294f32324..6cceeb0700a 100644 --- a/reference/pdo_firebird/pdo-firebird.xml +++ b/reference/pdo_firebird/pdo-firebird.xml @@ -1,9 +1,9 @@ - + - The Pdo\Firebird class + Pdo\Firebird クラス Pdo\Firebird @@ -12,8 +12,7 @@
&reftitle.intro; - A PDO subclass representing a connection using - the Firebird PDO driver. + Firebird PDO ドライバによる接続を示す PDO サブクラスです。
@@ -110,7 +109,7 @@ Pdo\Firebird::ATTR_DATE_FORMAT - Sets the date format. + 日付フォーマットを設定します。 @@ -118,7 +117,7 @@ Pdo\Firebird::ATTR_TIME_FORMAT - Sets the time format. + 時刻フォーマットを設定します。 @@ -126,7 +125,7 @@ Pdo\Firebird::ATTR_TIMESTAMP_FORMAT - Sets the timestamp format. + タイムスタンプフォーマットを設定します。 @@ -134,10 +133,10 @@ Pdo\Firebird::TRANSACTION_ISOLATION_LEVEL - Attribute to sets the transaction isolation level. - This can be one of Pdo\Firebird::READ_COMMITTED, - Pdo\Firebird::REPEATABLE_READ, - or Pdo\Firebird::SERIALIZABLE. + トランザクション分離レベルを設定します。 + Pdo\Firebird::READ_COMMITTED、 + Pdo\Firebird::REPEATABLE_READ、 + または Pdo\Firebird::SERIALIZABLE のいずれかです。 @@ -145,9 +144,9 @@ Pdo\Firebird::READ_COMMITTED - Flag denoting the ANSI transaction isolation - level is read commited. - This is the default behavior. + ANSI トランザクション分離レベルが + Read Committed であることを示すフラグです。 + これがデフォルトの動作です。 @@ -155,9 +154,9 @@ Pdo\Firebird::REPEATABLE_READ - Flag denoting the ANSI transaction isolation - level is repeatable read. - This corresponds to Firebird's "snapshot" isolation level. + ANSI トランザクション分離レベルが + Repeatable Read であることを示すフラグです。 + Firebird の "snapshot" 分離レベルに相当します。 @@ -165,9 +164,9 @@ Pdo\Firebird::SERIALIZABLE - Flag denoting the ANSI transaction isolation - level is serializable. - This corresponds to Firebird's "snapshot table stability" isolation level. + ANSI トランザクション分離レベルが + Serializeable であることを示すフラグです。 + Firebird の "snapshot table stability" 分離レベルに相当します。 @@ -175,9 +174,9 @@ Pdo\Firebird::WRITABLE_TRANSACTION - Boolean attribute used to toggle the transaction access mode between - READ ONLY and READ WRITE. - By default, it is &true; indicating READ WRITE. + ブール値で、トランザクションアクセスモードを + READ ONLY または READ WRITE に設定します。 + デフォルトは &true; で、READ WRITE を表します。 diff --git a/reference/pdo_firebird/pdo/firebird/getapiversion.xml b/reference/pdo_firebird/pdo/firebird/getapiversion.xml index ca061a8b2f5..932258ccce6 100644 --- a/reference/pdo_firebird/pdo/firebird/getapiversion.xml +++ b/reference/pdo_firebird/pdo/firebird/getapiversion.xml @@ -5,7 +5,7 @@ Pdo\Firebird::getApiVersion - Get the API version + APIバージョンを取得する @@ -15,8 +15,8 @@ - Returns the Firebird API version as defined by the C constant - FB_API_VER in ibase.h. + ibase.h 内で C 定数 FB_API_VER として定義されている + Firebird API のバージョンを返します。 @@ -28,7 +28,7 @@ &reftitle.returnvalues; - Returns the FireBird API as an int. + FireBird API のバージョンを int 型で返します。 diff --git a/reference/pdo_mysql/configure.xml b/reference/pdo_mysql/configure.xml index f190f320a7e..6a69824529a 100644 --- a/reference/pdo_mysql/configure.xml +++ b/reference/pdo_mysql/configure.xml @@ -50,9 +50,10 @@ $ ./configure --with-pdo-mysql --with-mysql-sock=/var/mysql/mysql.sock
- SSL サポートを有効にするには、適切な PDO_MySQL 定数 + SSL サポートを有効にするには、適切な + Pdo\Mysql::ATTR_SSL_* を指定します。これは MySQL C API 関数 mysql_ssl_set() - をコールするのと同じ意味になります。また、SSL を PDO::setAttribute + をコールするのと同じ意味になります。また、SSL を PDO::setAttribute で有効にすることはできません。というのも、この時点ではすでに接続が確立されてしまっているからです。 MySQL のドキュメントで SSL を使った MySQL への接続 について確認しましょう。 diff --git a/reference/pdo_mysql/constants.xml b/reference/pdo_mysql/constants.xml index e55db2e8361..e311bfa82e9 100644 --- a/reference/pdo_mysql/constants.xml +++ b/reference/pdo_mysql/constants.xml @@ -9,33 +9,12 @@ PDO::MYSQL_ATTR_USE_BUFFERED_QUERY - (bool) + (int) - デフォルトでは、全てのステートメントが - バッファモード. - で実行されます。 - この値を &false; に設定すると、 - PDO オブジェクトの場合、 - MySQL ドライバは非バッファモードを使います。 + Pdo\Mysql::ATTR_USE_BUFFERED_QUERY &Alias; - - MySQL の非バッファモードを使う - -setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false); -$unbufferedResult = $pdo->query("SELECT Name FROM City"); -foreach ($unbufferedResult as $row) { - echo $row['Name'] . PHP_EOL; -} -?> -]]> - - - @@ -44,46 +23,32 @@ foreach ($unbufferedResult as $row) { (int) - - LOAD LOCAL INFILE を有効にします。 - - - この定数を使うのは、新しいデータベースハンドルを作るときの - driver_options 配列内だけであることに注意しましょう。 - + + Pdo\Mysql::ATTR_LOCAL_INFILE &Alias; + PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY - (string) + (int) - - LOCAL DATA 文によるファイルのロードを、 - ここで指定したディレクトリに制限する機能を有効にします。 + + Pdo\Mysql::ATTR_LOCAL_INFILE_DIRECTORY &Alias; PHP 8.1.0 以降で利用可能です。 - - - この定数を使うのは、新しいデータベースハンドルを作るときの - driver_options 配列内だけであることに注意しましょう。 - + PDO::MYSQL_ATTR_INIT_COMMAND - (string) + (int) - - MySQL サーバーへの接続時に実行するコマンドを指定します。 - 再接続の際には自動的に再実行されます。 - - - この定数を使うのは、新しいデータベースハンドルを作るときの - driver_options 配列内だけであることに注意しましょう。 - + + Pdo\Mysql::ATTR_INIT_COMMAND &Alias; + @@ -92,12 +57,9 @@ foreach ($unbufferedResult as $row) { (int) - - my.cnf ではなく、 - 指定した名前のファイルからオプションを読み込みます。 - このオプションは、mysqlnd を使っている場合は利用できません。 - mysqlnd は mysql の設定ファイルを読んでいないからです。 - + + Pdo\Mysql::ATTR_READ_DEFAULT_FILE &Alias; + @@ -106,13 +68,9 @@ foreach ($unbufferedResult as $row) { (int) - - my.cnf あるいは - 別のファイル (MYSQL_READ_DEFAULT_FILE - で指定したもの) の中の、指定した名前のグループからオプションを読み込みます。 - このオプションは、mysqlnd を使っている場合は利用できません。 - mysqlnd は mysql の設定ファイルを読んでいないからです。 - + + Pdo\Mysql::ATTR_READ_DEFAULT_GROUP &Alias; + @@ -121,10 +79,9 @@ foreach ($unbufferedResult as $row) { (int) - - バッファの最大サイズ。デフォルトは 1 MiB です。 - mysqlnd を指定してコンパイルした場合は、この定数はサポートされていません。 - + + Pdo\Mysql::ATTR_MAX_BUFFER_SIZE &Alias; + @@ -133,9 +90,9 @@ foreach ($unbufferedResult as $row) { (int) - - プリペアドステートメントではなく、直接クエリを実行します。 - + + PDO::ATTR_EMULATE_PREPARES &Alias; + @@ -144,9 +101,9 @@ foreach ($unbufferedResult as $row) { (int) - - 変更された行数ではなく、見つかった (マッチした) 行数を返します。 - + + Pdo\Mysql::ATTR_FOUND_ROWS &Alias; + @@ -155,10 +112,9 @@ foreach ($unbufferedResult as $row) { (int) - - 関数名の後に続く空白を許可します。 - すべての関数名を予約語にします。 - + + Pdo\Mysql::ATTR_IGNORE_SPACE &Alias; + @@ -167,9 +123,21 @@ foreach ($unbufferedResult as $row) { (int) - - ネットワーク通信の圧縮を有効にします。 - + + Pdo\Mysql::ATTR_COMPRESS &Alias; + + + + + + + PDO::MYSQL_ATTR_SERVER_PUBLIC_KEY + (int) + + + + Pdo\Mysql::ATTR_SERVER_PUBLIC_KEY &Alias; + @@ -179,9 +147,9 @@ foreach ($unbufferedResult as $row) { (int) - - SSL 認証局のファイルパス。 - + + Pdo\Mysql::ATTR_SSL_CA &Alias; + @@ -191,10 +159,9 @@ foreach ($unbufferedResult as $row) { (int) - - 信頼済みのSSL認証局の証明書が入ったディレクトリパス。 - 証明書は、PEM フォーマットで格納されています。 - + + Pdo\Mysql::ATTR_SSL_CAPATH &Alias; + @@ -204,9 +171,9 @@ foreach ($unbufferedResult as $row) { (int) - - SSL 証明書のファイルパス。 - + + Pdo\Mysql::ATTR_SSL_CERT &Alias; + @@ -216,11 +183,9 @@ foreach ($unbufferedResult as $row) { (int) - - SSL 暗号化に使うひとつ以上の暗号の一覧。 - OpenSSL で有効なフォーマットで指定します。 - 例: DHE-RSA-AES256-SHA:AES128-SHA - + + Pdo\Mysql::ATTR_SSL_CIPHER &Alias; + @@ -230,9 +195,9 @@ foreach ($unbufferedResult as $row) { (int) - - SSL キーのファイルパス。 - + + Pdo\Mysql::ATTR_SSL_KEY &Alias; + @@ -242,13 +207,9 @@ foreach ($unbufferedResult as $row) { (int) - - サーバーの SSL 証明書の検証を無効にする方法を提供します。 - このオプションは、mysqlnd でのみ利用可能です。 - - - &version.exists.asof; 7.0.18 および PHP 7.1.4. - + + Pdo\Mysql::ATTR_SSL_VERIFY_SERVER_CERT &Alias; + @@ -258,14 +219,9 @@ foreach ($unbufferedResult as $row) { (int) - - &false; にすると、PDO::prepare - や PDO::query でのマルチクエリの実行を無効にします。 - - - この定数が使えるのは、データベースハンドルを新規作成する際の driver_options - 配列内だけであることに注意しましょう。 - + + Pdo\Mysql::ATTR_MULTI_STATEMENTS &Alias; + diff --git a/reference/pdo_mysql/pdo-mysql.xml b/reference/pdo_mysql/pdo-mysql.xml index f503b2b52ca..8affebdc06f 100644 --- a/reference/pdo_mysql/pdo-mysql.xml +++ b/reference/pdo_mysql/pdo-mysql.xml @@ -1,9 +1,9 @@ - + - The Pdo\Mysql class + Pdo\Mysql クラス Pdo\Mysql @@ -12,26 +12,25 @@
&reftitle.intro; - A PDO subclass representing a connection using - the MySQL PDO driver. + MySQL PDO ドライバによる接続を示す PDO サブクラスです。 - This driver supports a dedicated SQL query parser for the MySQL dialect. - It can handle the following: + このドライバは MySQL 方言向けに専用の SQL クエリパーサーをサポートしています。 + 次のものを処理可能です: - Single and double-quoted literals with both doubling and backslash as escaping mechanisms + シングルクオートやダブルクオートで囲まれたリテラルでのクオートの二重化やバックスラッシュによるエスケープ - Backtick literals with doubling as escaping mechanism + バッククオートで囲まれたリテラルでのクオートの二重化によるエスケープ - Two-dashes, C-style comments, and Hash-comments. + 2 つのハイフン、C スタイルのコメント、# によるコメント @@ -198,13 +197,14 @@ Pdo\Mysql::ATTR_USE_BUFFERED_QUERY - By default all statements are executed in - buffered mode. - If this attribute is set to &false; on a - Pdo\Mysql object, - the MySQL driver will use the unbuffered mode. + デフォルトでは、全てのステートメントが + バッファモード + で実行されます。 + この値を &false; に設定すると、 + Pdo\Mysql オブジェクトの + MySQL ドライバは非バッファモードを使います。 - Setting MySQL unbuffered mode + MySQL の非バッファモードを使う Pdo\Mysql::ATTR_LOCAL_INFILE - Enable LOAD LOCAL INFILE. + LOAD LOCAL INFILE を有効にします。 - Can only be used in the driver_options - array when constructing a new database handle. + この定数を使えるのは、新しいデータベースハンドルを作るときの + driver_options 配列内に限ります。 @@ -239,9 +239,9 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_LOCAL_INFILE_DIRECTORY - Allows restricting LOCAL DATA loading to files located in this - designated directory. - Available as of PHP 8.1.0. + LOCAL DATA 文によるファイルのロードを、 + ここで指定したディレクトリのみに制限します。 + PHP 8.1.0 以降で利用可能です。 @@ -252,8 +252,8 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_INIT_COMMAND - Command to execute when connecting to the MySQL server. - Will automatically be re-executed when reconnecting. + MySQL サーバーへの接続時に実行するコマンドを指定します。 + 再接続の際には自動的に再実行されます。 @@ -264,13 +264,13 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_READ_DEFAULT_FILE - Read options from the named option file instead of from - my.cnf. + my.cnf ではなく、 + 指定した名前のファイルからオプションを読み込みます。 - This option is not available if mysqlnd is used, - because mysqlnd does not read the mysql configuration files. + このオプションは、mysqlnd を使っている場合は利用できません。 + mysqlnd は mysql の設定ファイルを読んでいないからです。 @@ -279,14 +279,14 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_READ_DEFAULT_GROUP - Read options from the named group from my.cnf or - the file specified with - Pdo\Mysql::ATTR_READ_DEFAULT_FILE. + my.cnf あるいは + 別のファイル (Pdo\Mysql::ATTR_READ_DEFAULT_FILE + で指定したもの) の中の、指定した名前のグループからオプションを読み込みます。 - This option is not available if mysqlnd is used, - because mysqlnd does not read the mysql configuration files. + このオプションは、mysqlnd を使っている場合は利用できません。 + mysqlnd は mysql の設定ファイルを読んでいないからです。 @@ -295,7 +295,7 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_COMPRESS - Enable network communication compression. + ネットワーク通信の圧縮を有効にします。 @@ -303,7 +303,7 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_DIRECT_QUERY - &Alias; PDO::ATTR_EMULATE_PREPARES. + PDO::ATTR_EMULATE_PREPARES &Alias; @@ -311,8 +311,8 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_FOUND_ROWS - Return the number of found (matched) rows, - not the number of changed rows. + 変更された行数ではなく、 + 見つかった (マッチした) 行数を返します。 @@ -323,8 +323,8 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_IGNORE_SPACE - Permit spaces after SQL function names. - Makes all SQL functions names reserved words. + 関数名の後に続く空白を許可します。 + すべての関数名が予約語になります。 @@ -335,11 +335,11 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_MAX_BUFFER_SIZE - Maximum buffer size. Defaults to 1 MiB. + バッファの最大サイズ。デフォルトは 1 MiB です。 - This constant is not supported when compiled against mysqlnd. + mysqlnd を指定してコンパイルした場合は、この定数はサポートされていません。 @@ -348,9 +348,9 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_MULTI_STATEMENTS - Disables multi query execution in both - PDO::prepare and - PDO::query when set to &false;. + &false; にすると、 + PDO::prepareや + PDO::query でのマルチクエリの実行を無効にします。 @@ -361,7 +361,7 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_SERVER_PUBLIC_KEY - RSA public key file used with the SHA-256 based authentication. + SHA-256 ベースの認証で使用する RSA 公開鍵ファイル。 @@ -372,7 +372,7 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_SSL_KEY - The file path to the SSL key. + SSL キーのファイルパス。 @@ -383,7 +383,7 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_SSL_CERT - The file path to the SSL certificate. + SSL 証明書のファイルパス。 @@ -394,7 +394,7 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_SSL_CA - The file path to the SSL certificate authority. + SSL 認証局のファイルパス。 @@ -405,9 +405,9 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_SSL_CAPATH - The file path to the directory that contains the trusted - SSL CA certificates, - which are stored in PEM format. + 信頼済みの + SSL CA 証明書が入ったディレクトリパス。 + 証明書は、PEM フォーマットで格納されています。 @@ -418,9 +418,9 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_SSL_CIPHER - A list of one or more permissible ciphers to use for - SSL encryption, in a format understood by OpenSSL. - For example: DHE-RSA-AES256-SHA:AES128-SHA + SSL 暗号化に使うひとつ以上の暗号の一覧。 + OpenSSL で有効なフォーマットで指定します。 + 例: DHE-RSA-AES256-SHA:AES128-SHA @@ -431,12 +431,12 @@ foreach ($unbufferedResult as $row) { Pdo\Mysql::ATTR_SSL_VERIFY_SERVER_CERT - Provides a way to disable verification of the server SSL certificate. - Available as of PHP 7.0.18 and PHP 7.1.4. + サーバーの SSL 証明書の検証を無効にする方法を提供します。 + PHP 7.0.18 および PHP 7.1.4 以降で使用できます。 - This option is available only with mysqlnd. + このオプションは、mysqlnd でのみ利用可能です。 diff --git a/reference/pdo_mysql/pdo/mysql/getwarningcount.xml b/reference/pdo_mysql/pdo/mysql/getwarningcount.xml index 7a42ea4eb0f..0696ce7a3fe 100644 --- a/reference/pdo_mysql/pdo/mysql/getwarningcount.xml +++ b/reference/pdo_mysql/pdo/mysql/getwarningcount.xml @@ -5,7 +5,7 @@ Pdo\Mysql::getWarningCount - Returns the number of warnings from the last executed query + 最後に実行したクエリの警告の数を返す @@ -15,12 +15,12 @@ - Returns the number of warnings from the last executed query. + 最後に実行したクエリの警告の数を返します。 - For retrieving warning messages the following SQL command can be used: - SHOW WARNINGS [limit row_count]. + 警告メッセージを取得するには、次の SQL コマンドを使用できます: + SHOW WARNINGS [limit row_count] @@ -33,14 +33,14 @@ &reftitle.returnvalues; - Returns an int representing the number of warnings generated by the last query. + 最後に実行したクエリで発生した警告の数を int で返します。 &reftitle.examples; - <methodname>Pdo\Mysql::getWarningCount</methodname> example + <methodname>Pdo\Mysql::getWarningCount</methodname> の例 int) - - このオプションは、ODBC のカーソルライブラリが使うかを制御します。 - ODBC カーソルライブラリは、ドライバが実装していない高度なODBCの機能 - (例: スクロール可能なブロックカーソル) をいくつかサポートします。 - サポートしている値は以下の通りです: - - - - PDO::ODBC_SQL_USE_IF_NEEDED (デフォルト): - ODBC カーソルライブラリを必要な時に使います。 - - - - - PDO::ODBC_SQL_USE_DRIVER: - ODBC カーソルライブラリを使いません。 - - - - - PDO::ODBC_SQL_USE_ODBC: - ODBC カーソルライブラリを常に使います。 - - - - + + Pdo\Odbc::ATTR_USE_CURSOR_LIBRARY &Alias; + + + + + + PDO::ODBC_SQL_USE_IF_NEEDED + (int) + + + + Pdo\Odbc::SQL_USE_IF_NEEDED &Alias; + + + + + + PDO::ODBC_SQL_USE_DRIVER + (int) + + + + Pdo\Odbc::SQL_USE_DRIVER &Alias; + + + + + + PDO::ODBC_SQL_USE_ODBC + (int) + + + + Pdo\Odbc::SQL_USE_ODBC &Alias; + @@ -57,15 +67,9 @@ (bool) - - Windows のみ有効です。 - &true; の場合、UTF-16 でエンコードされた文字データ( - CHAR, - VARCHAR, LONGVARCHAR) を - データベースから読み取ったり、書き込んだりする際に UTF-8 に変換します。 - &false; の場合(デフォルト)、 - エンコーディングの変換はドライバが行う可能性があります。 - + + Pdo\Odbc::ATTR_ASSUME_UTF8 &Alias; + diff --git a/reference/pdo_odbc/pdo-odbc.xml b/reference/pdo_odbc/pdo-odbc.xml index 6d5f0a548fc..8857d4be514 100644 --- a/reference/pdo_odbc/pdo-odbc.xml +++ b/reference/pdo_odbc/pdo-odbc.xml @@ -1,9 +1,9 @@ - + - The Pdo\Odbc class + Pdo\Odbc クラス Pdo\Odbc @@ -12,8 +12,7 @@
&reftitle.intro; - A PDO subclass representing a connection using - the ODBC PDO driver. + ODBC PDO ドライバによる接続を示す PDO サブクラスです。
@@ -88,18 +87,18 @@ Pdo\Odbc::ATTR_USE_CURSOR_LIBRARY - This option controls whether the ODBC cursor library is used. - The ODBC cursor library supports some advanced ODBC features - (e.g. block scrollable cursors), - which may not be implemented by the driver. - The following values are supported: + このオプションは、ODBC のカーソルライブラリが使うかを制御します。 + ODBC カーソルライブラリは、ドライバが実装していない高度なODBCの機能 + (例: スクロール可能なブロックカーソル) + をいくつかサポートします。 + サポートしている値は次の通りです: Pdo\Odbc::SQL_USE_IF_NEEDED - Use the ODBC cursor library when needed. - This is the default. + 必要な場合にのみ ODBC カーソルライブラリを使用します。 + これがデフォルトです。 @@ -107,7 +106,7 @@ Pdo\Odbc::SQL_USE_DRIVER - Never use the ODBC cursor library. + ODBC カーソルライブラリを使用しません。 @@ -115,7 +114,7 @@ Pdo\Odbc::SQL_USE_ODBC - Always use the ODBC cursor library. + 常に ODBC カーソルライブラリを使用します。 @@ -127,11 +126,11 @@ Pdo\Odbc::ATTR_ASSUME_UTF8 - Windows only. - If &true;, UTF-16 encoded character data (CHAR, - VARCHAR and LONGVARCHAR) - is converted to UTF-8 when reading from or writing data to the database. - If &false; (the default), character encoding conversion may be done by the driver. + Windows のみ有効です。 + &true; の場合、UTF-16 でエンコードされた文字データ(CHAR, + VARCHAR, LONGVARCHAR) を + データベースから読み取ったり、書き込んだりする際に UTF-8 に変換します。 + &false; の場合(デフォルト)、エンコーディングの変換はドライバが行う可能性があります。 diff --git a/reference/pdo_pgsql/PDO/pgsql/copyfromarray.xml b/reference/pdo_pgsql/PDO/pgsql/copyfromarray.xml index 235c1882d7a..2019e69a362 100644 --- a/reference/pdo_pgsql/PDO/pgsql/copyfromarray.xml +++ b/reference/pdo_pgsql/PDO/pgsql/copyfromarray.xml @@ -1,11 +1,11 @@ - + Pdo\Pgsql::copyFromArray - Copy data from a PHP array into a table + PHP の配列から、データをテーブルにコピーする @@ -19,9 +19,9 @@ stringnullfields&null; - Copies data from rows array to table - tableName using separator - as fields delimiter and fields list. + rows 配列からデータをテーブル + tableName にコピーします。その際、separator を + フィールドのデリミタ、そして fields のリストを使います。 @@ -32,7 +32,7 @@ tableName - String containing table name. + テーブル名を含む文字列 @@ -40,8 +40,7 @@ rows - An indexed array of strings with fields - separated by separator. + separator で区切られたフィールドの文字列の配列 @@ -49,8 +48,8 @@ separator - Delimiter used to separate fields in an entry of the - rows array. + rows 配列の各要素の中で + フィールドを分割するためのデリミタ @@ -58,7 +57,7 @@ nullAs - How to interpret SQL NULL values. + SQLの NULL 値をどのように扱うかを指定します @@ -66,7 +65,7 @@ fields - List of fields to insert. + 挿入するフィールドの一覧 diff --git a/reference/pdo_pgsql/PDO/pgsql/copyfromfile.xml b/reference/pdo_pgsql/PDO/pgsql/copyfromfile.xml index 0f4b2116c9c..260e02cede4 100644 --- a/reference/pdo_pgsql/PDO/pgsql/copyfromfile.xml +++ b/reference/pdo_pgsql/PDO/pgsql/copyfromfile.xml @@ -1,11 +1,11 @@ - + Pdo\Pgsql::copyFromFile - Copy data from file into table + ファイルからデータをテーブルにコピーする @@ -19,9 +19,9 @@ stringnullfields&null; - Copies data from file specified by filename - into table tableName using - separator as fields delimiter and fields list + filename で指定されたファイルからデータを + テーブル tableName にコピーします。その際、 + separator をフィールドのデリミタ、そして fields のリストを使います。 @@ -35,7 +35,7 @@ filename - Filename containing the data to import. + インポートするデータを含むファイル名 diff --git a/reference/pdo_pgsql/PDO/pgsql/copytoarray.xml b/reference/pdo_pgsql/PDO/pgsql/copytoarray.xml index 34c5e8d78ba..30a74390ad0 100644 --- a/reference/pdo_pgsql/PDO/pgsql/copytoarray.xml +++ b/reference/pdo_pgsql/PDO/pgsql/copytoarray.xml @@ -5,7 +5,7 @@ Pdo\Pgsql::copyToArray - Copy data from database table into PHP array + データベーステーブルからのデータをPHPの配列にコピーする @@ -18,7 +18,7 @@ stringnullfields&null; - Copies data from tableName into array using delimiter as fields delimiter and fields list + tableName のデータを配列にコピーします。その際、separator をフィールドのデリミタ、そして fields のリストを使います。 @@ -38,7 +38,7 @@ fields - List of fields to export. + エクスポートするフィールドの一覧 @@ -48,7 +48,7 @@ &reftitle.returnvalues; - Returns an array of rows,&return.falseforfailure;. + 行の配列を返します。&return.falseforfailure; diff --git a/reference/pdo_pgsql/PDO/pgsql/copytofile.xml b/reference/pdo_pgsql/PDO/pgsql/copytofile.xml index 782185a1f39..c09e197b432 100644 --- a/reference/pdo_pgsql/PDO/pgsql/copytofile.xml +++ b/reference/pdo_pgsql/PDO/pgsql/copytofile.xml @@ -1,11 +1,11 @@ - + Pdo\Pgsql::copyToFile - Copy data from table into file + テーブルのデータをファイルにコピーする @@ -19,9 +19,9 @@ stringnullfields&null; - Copies data from table into file specified by filename - using separator as fields delimiter and - fields list. + filename で指定されたファイルに、テーブルからデータをコピーします。 + その際、separator をフィールドのデリミタ、そして + fields のリストを使います。 @@ -35,7 +35,7 @@ filename - Filename to export data. + エキスポートするファイル名 @@ -49,7 +49,7 @@ fields - List of fields to insert. + 挿入するフィールドの一覧 diff --git a/reference/pdo_pgsql/PDO/pgsql/escapeidentifier.xml b/reference/pdo_pgsql/PDO/pgsql/escapeidentifier.xml index d141f3e8fff..8842adec6d0 100644 --- a/reference/pdo_pgsql/PDO/pgsql/escapeidentifier.xml +++ b/reference/pdo_pgsql/PDO/pgsql/escapeidentifier.xml @@ -5,7 +5,7 @@ Pdo\Pgsql::escapeIdentifier - Escapes a string for use as an SQL identifier + SQL識別子として使用するために文字列をエスケープする @@ -15,10 +15,10 @@ stringinput - Escapes a string for use as an SQL identifier, such as a table, column, or function name. - This is useful when a user-supplied identifier might contain special characters - that would otherwise not be interpreted as part of the identifier by the SQL parser, - or when the identifier might contain upper case characters whose case should be preserved. + テーブル名、カラム名、または関数名など、SQL の識別子として使用する文字列をエスケープします。 + これは、ユーザーから提供された識別子が特殊文字を含むため、 + SQLパーサーが識別子の一部として解釈できない場合や、 + 大文字を含む識別子でそれを保持したい場合に有用です。 @@ -29,7 +29,7 @@ input - A string containing text to be escaped. + エスケープ対象の文字列(string) @@ -39,14 +39,14 @@ &reftitle.returnvalues; - A string containing the escaped data. + エスケープされた文字列(string) を返します。 &reftitle.examples; - <methodname>Pdo\Pgsql::escapeIdentifier</methodname> example + <methodname>Pdo\Pgsql::escapeIdentifier</methodname> の例 - + Pdo\Pgsql::getNotify - Get asynchronous notification + 非同期に通知を取得する @@ -16,7 +16,7 @@ inttimeoutMilliseconds0 - Returns a result set representing a pending asynchronous notification. + 保留中の非同期な通知を示す結果セットを返します。 @@ -27,8 +27,8 @@ fetchMode - The format the result set should be returned as, - one of the following constants: + 結果セットを返すフォーマット。 + 次のいずれかの定数: PDO::FETCH_DEFAULT PDO::FETCH_BOTH @@ -42,7 +42,7 @@ timeoutMilliseconds - The length of time to wait for a response, in milliseconds. + レスポンスを待つ時間の長さ。ミリ秒で指定します。 @@ -52,29 +52,27 @@ &reftitle.returnvalues; - If one or more notifications is pending, returns a single row, - with fields message and pid, - otherwise returns &false;. + ひとつ以上の通知が保留中だった場合、 + messagepid のフィールドを含む1行を返します。 + そうでなければ &false; を返します。 &reftitle.errors; - A ValueError is thrown if - fetchMode is not one of the valid + fetchMode が有効な PDO::FETCH_* - constants. + 定数のいずれでもない場合、ValueError がスローされます。 - A ValueError is thrown if - timeoutMilliseconds is less than 0. + timeoutMilliseconds0 未満の場合、 + ValueError がスローされます。 - A E_WARNING is raised when - timeoutMilliseconds is greater than the value - that can be contained in a signed 32-bit integer, in which case it will be - the maximum value of a signed 32-bit integer. + timeoutMilliseconds が符号付き32ビットの整数に + 収まらない場合、E_WARNING が発生し、 + その値は符号付き32ビットの整数の最大値に丸められます。 diff --git a/reference/pdo_pgsql/PDO/pgsql/getpid.xml b/reference/pdo_pgsql/PDO/pgsql/getpid.xml index 5be3bb55df9..7762cc4e36f 100644 --- a/reference/pdo_pgsql/PDO/pgsql/getpid.xml +++ b/reference/pdo_pgsql/PDO/pgsql/getpid.xml @@ -5,7 +5,7 @@ Pdo\Pgsql::getPid - Get the PID of the backend process handling this connection + 接続を処理するバックエンドプロセスのPIDを取得する @@ -15,9 +15,9 @@ - Returns the PID of the backend process handling this connection. - Note that the PID belongs to a process executing on the database server host, - not the local host. + この接続を処理するバックエンドプロセスのPIDを返します。 + このPIDはローカルホストではなく、データベースサーバーが稼働するホスト上のプロセスを示す点に + 注意してください。 @@ -29,7 +29,7 @@ &reftitle.returnvalues; - Returns the PID as an int. + サーバーのPIDを int として返します。 diff --git a/reference/pdo_pgsql/PDO/pgsql/lobcreate.xml b/reference/pdo_pgsql/PDO/pgsql/lobcreate.xml index a95420eeda9..7dfa7ff3d5a 100644 --- a/reference/pdo_pgsql/PDO/pgsql/lobcreate.xml +++ b/reference/pdo_pgsql/PDO/pgsql/lobcreate.xml @@ -1,11 +1,11 @@ - + Pdo\Pgsql::lobCreate - Creates a new large object + 新しいラージオブジェクトを作成する @@ -15,30 +15,31 @@ - Pdo\Pgsql::lobCreate creates a large object - and returns the OID which refers to it. - It can be opened to read or write data with - Pdo\Pgsql::lobOpen. + Pdo\Pgsql::lobCreate は、 + ラージオブジェクトを作成してその OID を返します。 + このオブジェクトに対するデータの読み書きは、 + Pdo\Pgsql::lobOpen を使用します。 - The OID can be stored in columns of type OID and be used to reference - the large object, without causing the row to grow arbitrarily large. - The large object will continue to live in the database until it - is removed by calling Pdo\Pgsql::lobUnlink. + OID は OID 型のカラムに格納され、 + ラージオブジェクトを参照するために使用されます。 + これにより、行のサイズがどんどん拡大してしまうことを防ぎます。 + ラージオブジェクトは Pdo\Pgsql::lobUnlink を + コールして削除するまで、データベースに残り続けます。 - Large objects are cumbersome to use. - Indeed, it is required that Pdo\Pgsql::lobUnlink - is called prior to deleting the last row referencing the OID in the entire database; - otherwise, unreferenced large objects will remain on the server indefinitely. - Moreover, large objects have no access controls. - An alternative is the bytea column type, which can be up to 1GB in size, - and this column type transparently manages the storage for optimal row size. + ラージオブジェクトの取り扱いは複雑です。 + オブジェクトの OID を参照している行をデータベースから削除する際には、 + 必ず事前に PDO::pgsqlLOBUnlinkをコールしなければなりません。 + そうしないと、どこからも参照されないラージオブジェクトが、サーバに残り続けてしまうでしょう。 + さらに、ラージオブジェクトにはアクセス権を設定できません。 + 代替として、bytea 型のカラムも検討ください。最近のバージョンの PostgreSQL では + bytea 型のカラムに最大 1GBまで保存でき、行サイズを最適化したうえでデータを透過的に扱うことができます。 - This function, and all manipulations of the large object, - must be called and carried out within a transaction. + この関数を含むラージオブジェクトへの全ての操作は + トランザクション内で行わなければなりません。 @@ -51,19 +52,19 @@ &reftitle.returnvalues; - Returns the OID of the newly created large object on success, - &return.falseforfailure;. + 成功した場合、新しく作成されたラージオブジェクトの OID、 + &return.falseforfailure;。 &reftitle.examples; - <methodname>Pdo\Pgsql::lobCreate</methodname> example + <methodname>Pdo\Pgsql::lobCreate</methodname> の例 - This example creates a new large object and copies the contents - of a file into it. - The OID is then stored into a table. + この例では、新しいラージオブジェクトを作成し、 + ファイルの内容をそこにコピーします。その後、 + OID がテーブルに保存されます。 Pdo\Pgsql::lobOpen - Opens an existing large object stream + 既存のラージオブジェクトのストリームをオープンする @@ -16,11 +16,11 @@ stringmode"rb" - Pdo\Pgsql::lobOpen opens a stream to access - the data referenced by oid. - All usual filesystem functions, such as fread, - fwrite or fgets can be used - to manipulate the contents of the stream. + Pdo\Pgsql::lobOpen は、oid + が指すデータにアクセスするためのストリームをオープンします。 + freadfwrite および + fgets などの通常のファイルシステム関数を使用して、 + ストリームの内容を操作することができます。 @@ -34,7 +34,7 @@ oid - A large object identifier. + ラージオブジェクトの ID。 @@ -42,8 +42,8 @@ mode - If mode is r, open the stream for reading. - If mode is w, open the stream for writing. + モードが r の場合、読み込み用のストリームをオープンします。 + モードが w の場合、書き込み用のストリームをオープンします。 @@ -53,26 +53,26 @@ &reftitle.returnvalues; - Returns a stream resource on success,&return.falseforfailure;. + 成功した場合にストリームリソース、&return.falseforfailure;。 &reftitle.errors; - When does this function issue E_* level errors, - and/or throw Exceptions. + 何らかの問題が発生した場合、E_* レベルのエラー + または Exception をスローします。 &reftitle.examples; - <methodname>Pdo\Pgsql::lobOpen</methodname> example + <methodname>Pdo\Pgsql::lobOpen</methodname> の例 - Following on from the Pdo\Pgsql::lobCreate - example, this code snippet retrieves the large object from - the database and outputs it to the browser. + Pdo\Pgsql::lobCreate の例に続き、 + このコードはデータベースからラージオブジェクトを取得し + ブラウザに出力します。 - + Pdo\Pgsql::lobUnlink - Deletes the large object + ラージオブジェクトを削除する @@ -15,7 +15,7 @@ stringoid - Deletes a large object from the database identified by OID. + OID が指すラージオブジェクトをデータベースから削除します。 @@ -29,7 +29,7 @@ oid - A large object identifier. + ラージオブジェクトの ID。 @@ -46,12 +46,12 @@ &reftitle.examples; - <methodname>Pdo\Pgsql::lobUnlink</methodname> example + <methodname>Pdo\Pgsql::lobUnlink</methodname> の例 - This example unlinks a large object from the database prior to deleting - the row that references it from the blobs table are used in the examples of - Pdo\Pgsql::lobCreate and - Pdo\Pgsql::lobOpen. + Pdo\Pgsql::lobCreate および + Pdo\Pgsql::lobOpen の例で使用した blob + テーブルからラージオブジェクトを参照している行を削除する前に、 + この例ではラージオブジェクトをデータベースから削除します。 Pdo\Pgsql::setNoticeCallback - Set a callback to handle notice and warning messages generated by the backend + バックエンドが生成する通知および警告メッセージを処理するコールバックを設定する @@ -15,11 +15,11 @@ callablenullcallback - Set a callback to handle notice and warning messages generated by the backend. - This includes messages emitted by PostgreSQL itself, - as well as those raised by user-defined SQL functions using RAISE. - Please note that the actual receipt of these messages - depends on the backend setting client_min_messages. + バックエンドが生成する通知および警告メッセージを処理するためのコールバックを設定します。 + これには、PostgreSQL 本体が出力するメッセージや、 + ユーザー定義 SQL 関数で RAISE されたメッセージも含まれます。 + これらのメッセージを実際に受信できるかは、バックエンド側の設定 + client_min_messages に依存する点に注意してください。 @@ -30,10 +30,10 @@ callback - If &null; is passed, the handler is reset to its default state. + &null; を渡すと、ハンドラはデフォルトの状態にリセットされます。 - Otherwise, the handler is a callback with the following signature: + それ以外の場合、ハンドラは次のシグネチャを持つコールバック関数です: voidhandler stringmessage @@ -43,7 +43,7 @@ message - A message generated by the backend. + バックエンドが生成したメッセージ @@ -64,11 +64,10 @@ &reftitle.examples; - <methodname>Pdo\Pgsql::setNoticeCallback</methodname> example + <methodname>Pdo\Pgsql::setNoticeCallback</methodname> の例 exec('CREATE TABLE parent(id int primary key)'); diff --git a/reference/pdo_pgsql/PDO/pgsqlCopyFromArray.xml b/reference/pdo_pgsql/PDO/pgsqlCopyFromArray.xml index f873b8e17c5..3855808ab62 100644 --- a/reference/pdo_pgsql/PDO/pgsqlCopyFromArray.xml +++ b/reference/pdo_pgsql/PDO/pgsqlCopyFromArray.xml @@ -4,78 +4,23 @@ PDO::pgsqlCopyFromArray - PHP の配列から、データをテーブルにコピーする + + Pdo\Pgsql::copyFromArray &Alias; + &reftitle.description; - public bool PDO::pgsqlCopyFromArray - stringtable_name + public boolPDO::pgsqlCopyFromArray + stringtableName arrayrows - stringdelimiter"\t" - stringnull_as"\\\\N" - stringfields + stringseparator"\t" + stringnullAs"\\\\N" + stringnullfields&null; - - rows 配列からデータをテーブル table_name にコピーします。 - その際、delimiter をフィールドのデリミタ、そして fields のリストを使います。 - - - - - &reftitle.parameters; - - - - table_name - - - テーブル名を含む文字列 - - - - - rows - - - delimiter で区切られたフィールドの文字列の配列 - - - - - delimiter - - - rows 配列で使われているデリミタ - - - - - null_as - - - どのように null 値を扱うかを指定します - - - - - fields - - - 挿入するフィールドの一覧 - - - - - - - - - &reftitle.returnvalues; - - 成功したら &true; を返します。 - &return.falseforfailure; - + + &info.method.alias; Pdo\Pgsql::copyFromArray. + - - + + - The Pdo\pgsql class - Pdo\pgsql + Pdo\Pgsql クラス + Pdo\Pgsql @@ -12,37 +12,36 @@
&reftitle.intro; - A PDO subclass representing a connection using - the PostgreSQL PDO driver. + PostgreSQL PDO ドライバによる接続を示す PDO サブクラスです。 - This driver supports a dedicated SQL query parser for the PostgreSQL dialect. - It can handle the following: + このドライバは PostgreSQL 方言向けに専用の SQL クエリパーサーをサポートしています。 + 次のものを処理可能です: - Single and double-quoted literals, with doubling as escaping mechanism + シングルクオートやダブルクオートで囲まれたリテラルでのクオートの二重化によるエスケープ - C-style “escape” string literals + C スタイルの「エスケープ」文字列リテラル - Dollar-quoted string literals + ドル記号で囲まれた文字列リテラル - Two-dashes and C-style comments (non-nested). + 2 つのハイフンとネストされていない C スタイルのコメント - Support for ?? as escape sequence for the - ? operator. + ? 演算子のエスケープシーケンスとしての + ?? のサポート @@ -137,10 +136,10 @@ Pdo\Pgsql::ATTR_DISABLE_PREPARES - Send the query and the parameters to the server together in a single - call, avoiding the need to create a named prepared statement separately. - If the query is only going to be executed once this can reduce latency by - avoiding an unnecessary server round-trip. + SQL文とパラメータを一緒に、一回のコールでサーバーに送信します。 + これによって、名前付きのプリペアドステートメントを別々に作ることを避けられます。 + SQL文が一度しか実行されない場合、 + 不要なサーバーとの通信を避けられるので、レイテンシを抑えることができます。 @@ -148,9 +147,9 @@ Pdo\Pgsql::ATTR_RESULT_MEMORY_SIZE - Returns the amount of memory, in bytes, allocated to the specified - query result PDOStatement instance, - or &null; if no results exist before the query is executed. + 指定されたクエリ結果 PDOStatement + インスタンスに割り当てられたメモリ使用量をバイト単位で返します。 + クエリ実行前で結果が存在しない場合は &null; を返します。 diff --git a/reference/pdo_sqlite/PDO/sqlite/createaggregate.xml b/reference/pdo_sqlite/PDO/sqlite/createaggregate.xml index ffe8e5394b8..9c3eec30e0e 100644 --- a/reference/pdo_sqlite/PDO/sqlite/createaggregate.xml +++ b/reference/pdo_sqlite/PDO/sqlite/createaggregate.xml @@ -1,12 +1,12 @@ - + Pdo\Sqlite::createAggregate - Registers an aggregating user-defined function for use in SQL statements + SQL 文で使用するユーザー定義集約関数を登録する @@ -20,18 +20,18 @@ intnumArgs-1 - This method is similar to Pdo\Sqlite::createFunction - except that it registers functions that can be used to calculate a - result aggregated across all the rows of a query. + このメソッドは Pdo\Sqlite::createFunction + と似ていますが、クエリのすべての行を集約する関数を登録する点が + 異なります。 - The key difference between this method and + この関数と Pdo\Sqlite::createFunction - is that two functions are required to manage the aggregate. + の最大の違いは、集約関数の登録には 2 つの関数が必要であるということです。 - By using this method it is possible to override native SQL functions. + このメソッドを使用してネイティブ SQL 関数を上書きすることができます。 @@ -43,7 +43,7 @@ name - The name of the function used in SQL statements. + SQL 文で使用する関数の名前。 @@ -51,11 +51,11 @@ step - Callback function called for each row of the result set. - The callback should accumulate the result and store it in the aggregation context. + 結果セットの各行を処理するコールバック関数。 + この関数は、結果を蓄積して集約コンテキストに保存しなければなりません。 - This function need to be defined as: + 定義は次のとおりです: mixedstep mixedcontext @@ -68,9 +68,9 @@ context - &null; for the first row; on subsequent rows it will have the value - that was previously returned from the step function; you should use - this to maintain the aggregate state. + 最初の行では &null; + 2行目以降では、この関数が前回返した値です。 + この値で集約の状態を管理します。 @@ -78,7 +78,7 @@ rownumber - The current row number. + 現在の行番号 @@ -86,7 +86,7 @@ value - The first argument passed to the aggregate. + 集約関数に渡されるはじめの引数 @@ -94,14 +94,14 @@ values - Further arguments passed to the aggregate. + 集約関数に渡されるふたつめ以降の引数 - The return value of this function will be used as the - context argument in the next call of the step or - finalize functions. + この関数の戻り値を、次の関数呼び出し、または + ファイナライズ関数のcontext 引数として + 使います。 @@ -109,14 +109,14 @@ finalize - Callback function to aggregate the "stepped" data from each row. - Once all the rows have been processed, this function will be called, - and it should then take the data from the aggregation context and return the result. - This callback function should return a type understood by SQLite - (i.e. scalar type). + すべての行が処理された後で呼び出されるコールバック関数。 + ここでは、集約コンテキストからデータを取得して結果を返します。 + この関数が返す値は、SQLite が理解できる形式 (すなわち + スカラー型) + でなければなりません。 - This function need to be defined as: + 定義は次のとおりです: mixedfini mixedcontext @@ -127,7 +127,7 @@ context - Holds the return value from the very last call to the step function. + ステップ関数の最後の戻り値 @@ -135,13 +135,13 @@ rowcount - Holds the number of rows over which the aggregate was performed. + ステップ関数が処理した行数 - The return value of this function will be used as the return value for - the aggregate. + この関数の戻り値が、 + 集約関数全体の戻り値となります。 @@ -149,8 +149,8 @@ numArgs - Hint to the SQLite parser if the callback function accepts a - predetermined number of arguments. + コールバック関数があらかじめ定義済みの引数を受け取る場合に、 + SQLite のパーサに渡すヒント。 @@ -169,28 +169,28 @@ <methodname>Pdo\Sqlite::createAggregate</methodname> example - In this example we will create a custom aggregate function named - max_length that can be used in SQL queries. + この例では、SQLクエリの中で使用できる + max_length という名前のユーザー定義集約関数を作成しています。 - In this example, we are creating an aggregating function, - named max_length, that will calculate the length - of the longest string in one of the columns of the table. - For each row, the max_len_step function is called and - passed a $context parameter. - The context parameter is just like any other PHP variable and be set to - hold an array or even an object. - In this example, we are using it to hold the maximum length we have seen so far; - if the $string has a length longer than the current maximum, - we update the context to hold this new maximum length. + この例では、max_length という集約関数を + 作成しています。この関数はテーブルの特定のカラム内で + 最も長い文字列の長さを計算します。 + 各行に対し max_len_step 関数が呼ばれ、 + その際に $context パラメータが渡されます。 + この context パラメータには、他の PHP 変数と同様 + arrayobject などを格納できます。 + この例では、これまでの中で最大の文字列長を格納するために利用しています。 + もし $string が現在の最大値よりも長ければ、 + context に格納した最大長を新たな値で更新します。 - After all the rows have been processed, - SQLite calls the max_len_finalize function to determine - the aggregate result. - It is possible to perform some kind of calculation based on the data in $context. - In this basic example the result was calculated as the query progressed, - thus so the context value can be directly returned. + 全ての行が処理された後、 + SQLite は集約関数の結果を計算するため max_len_finalize + 関数を呼び出します。 + $context 内のデータに基づいて何らかの計算を行うことも可能です。 + この例では、結果はクエリの進行中に計算されているため、 + context の値をそのまま返すことができます。 - It is NOT recommended for you to store a copy of the values in the context - and then process them at the end, as you would cause SQLite to use a lot of - memory to process the query - just think of how much memory you would need - if a million rows were stored in memory, each containing a string 32 bytes - in length. + 結果の値を context に蓄積し、最後に一括で処理する方法は推奨 + 「しません」。これは、SQLite のメモリ消費量が大きくなるからです。 + 仮に 32 バイトの長さのデータが百万件あったとして、 + それを蓄積しておくのにどれだけのメモリが必要になるか + 考えてみましょう。 diff --git a/reference/pdo_sqlite/PDO/sqlite/createcollation.xml b/reference/pdo_sqlite/PDO/sqlite/createcollation.xml index 70208d81d74..5933b25e3f0 100644 --- a/reference/pdo_sqlite/PDO/sqlite/createcollation.xml +++ b/reference/pdo_sqlite/PDO/sqlite/createcollation.xml @@ -1,12 +1,12 @@ - + Pdo\Sqlite::createCollation - Registers a user-defined function for use as a collating function in SQL statements + SQL文で文字列比較関数として使うユーザー定義関数を登録する @@ -18,8 +18,8 @@ callablecallback - This method is similar to Pdo\Sqlite::createFunction - except that it registers functions that are used to collate strings. + このメソッドは Pdo\Sqlite::createFunction + と似ていますが、文字列比較関数を登録する点が異なります。 @@ -30,7 +30,7 @@ name - Name of the SQL collating function to be created or redefined. + 作成または再定義する文字列比較 SQL 関数の名前 @@ -38,12 +38,12 @@ callback - Callback function that defines the behaviour of a collation. - It must accept two strings and return - -1, 0, or 1 - if the first string sorts before, sorts identically, or sorts after - the second string respectively. - An internal function that behaves like this is strcmp. + 文字列比較の動作を定義するコールバック関数です。 + この関数は2つのstringを受け取り、 + 1番目の文字列が2番目の文字列より前に並ぶ場合 -1、 + 同じ並び順の場合 0、 + 後に並ぶ場合 1 を返さなければなりません。 + これに似た振る舞いをする組み込み関数として、strcmp が挙げられます。 This function need to be defined as: @@ -68,7 +68,7 @@ &reftitle.examples; - <methodname>Pdo\Sqlite::createCollation</methodname> example + <methodname>Pdo\Sqlite::createCollation</methodname> の例 Pdo\Sqlite::createFunction - Registers a user-defined function for use in SQL statements + SQL 文で使用するユーザー定義関数を登録する @@ -20,14 +20,14 @@ intflags0 - This method allows PHP function to be registered with SQLite as a - user-defined function, so that it can be called within SQL queries. - The defined function can be used in any SQL query that allows function calls, - for example SELECT, UPDATE, or triggers. + PHP 関数を、ユーザー定義関数として SQLite に登録します。 + 登録した関数は、SQL 文の中で使用することが可能です。 + ユーザー定義関数は、関数をコールできるあらゆる SQL 文 + (SELECTUPDATE 、トリガなど) から呼び出せます。 - By using this method it is possible to override native SQL functions. + このメソッドを使用してネイティブ SQL 関数を上書きすることができます。 @@ -39,7 +39,7 @@ function_name - The name of the function used in SQL statements. + SQL 文で使用する関数の名前。 @@ -47,16 +47,17 @@ callback - Callback function to handle the defined SQL function. + 定義した SQL 関数を処理するコールバック関数。 - Callback functions should return a type understood by SQLite (i.e. - scalar type). + この関数が返す値は、SQLite が理解できる形式 (すなわち + スカラー型) + でなければなりません。 - This function need to be defined as: + コールバック関数の定義は次のとおりです: mixedcallback mixedvalue @@ -67,7 +68,7 @@ value - The first argument passed to the SQL function. + SQL関数に渡す最初の引数 @@ -75,7 +76,7 @@ values - Further arguments passed to the SQL function. + SQL関数に渡す2つ目以降の引数 @@ -87,9 +88,9 @@ num_args - The number of arguments that the SQL function takes. - If this parameter is -1, - then the SQL function may take any number of arguments. + SQL 関数がとる引数の数。 + このパラメータが -1 の場合、 + SQL 関数は任意の数の引数を取ることができます。 @@ -97,10 +98,10 @@ flags - A bitmask of flags. - Currently, only Pdo\Sqlite::DETERMINISTIC is supported, - which specifies that the function always returns the same result given - the same inputs within a single SQL statement. + ビット単位のフラグの組み合わせ。 + 現在は、PDO::SQLITE_DETERMINISTIC だけがサポートされています。 + これは、単一のSQLステートメント内では、 + 同じ入力に対して常に同じ結果を返すことを指定します。 @@ -117,16 +118,16 @@ &reftitle.examples; - <methodname>Pdo\Sqlite::createFunction</methodname> example + <methodname>Pdo\Sqlite::createFunction</methodname> の例 - In this example, we have a function that calculates the SHA256 sum of a - string, and then reverses it. When the SQL statement executes, it - returns the value of the filename transformed by our function. - The data returned in $rows contains the processed result. + この例では、文字列の SHA256 ハッシュを計算し + それを反転する関数を使っています。SQL 文を実行すると、 + この関数によって変換されたファイル名が + $rows に格納され返ります。 - The beauty of this technique is that there is no need to process the - result using a &foreach; loop after the query. + この手法の素晴らしい点は、クエリの後に + &foreach; ループを用いて結果を処理する必要がないことです。 PDO::sqliteCreateAggregate - SQL 文で使用する集約ユーザー定義関数 (UDF) を登録する + Pdo\Sqlite::createAggregate &Alias; @@ -14,246 +14,14 @@ &reftitle.description; public boolPDO::sqliteCreateAggregate - stringfunction_name - callablestep_func - callablefinalize_func - intnum_args + stringname + callablestep + callablefinalize + intnumArgs-1 - &warn.experimental.func; - - このメソッドは - と似ていますが、 - この関数で登録した関数は、クエリのすべての行の内容を集約する関数を登録します。 - - - この関数と の最大の違いは、 - 集約関数を作成するためには 2 つの関数が必要であるということです。 - - - - - &reftitle.parameters; - - - - function_name - - - SQL 文で使用する関数の名前。 - - - - - step_func - - - 結果セットの各行についてコールされるコールバック関数。 - この PHP 関数は、結果を蓄積して集約コンテキストに保存しなければなりません。 - - - この関数は次のように定義しなければなりません。 - - mixedstep - mixedcontext - intrownumber - mixedvalue - mixedvalues - - - - context - - - 最初の行では &null; - 二行目以降では、ステップ関数から以前返された値を持ちます。 - この値を、集約の状態を管理するのに使うべきです。 - - - - - rownumber - - - 現在の行番号 - - - - - value - - - 集約関数に渡されるはじめの引数 - - - - - values - - - 集約関数に渡されるふたつめ以降の引数 - - - - - この関数の戻り値を、次のステップあるいはファイナライズ関数の - context 引数として使います。 - - - - - finalize_func - - - すべての行が処理された後でコールされるコールバック関数。 - ここでは、集約コンテキストからデータを取得して結果を返します。 - コールバック関数の返す値は、SQLite が理解できる形式 (すなわち - スカラー型) - でなければなりません。 - - - この関数は次のように定義しなければなりません。 - - mixedfini - mixedcontext - introwcount - - - - context - - - ステップ関数を最後に呼んだ時の戻り値を保持します。 - - - - - rowcount - - - 集約関数が実行された行数を保持します。 - - - - - この関数の戻り値が、集約の戻り値となります。 - - - - - num_args - - - コールバック関数があらかじめ定義済みの引数を受け取る場合に、 - SQLite のパーサに渡すヒント。 - - - - - - - - - &reftitle.returnvalues; - - &return.success; - - - - - &reftitle.examples; - - - 集約関数 max_length の例 - -exec("CREATE TABLE strings(a)"); -$insert = $db->prepare('INSERT INTO strings VALUES (?)'); -foreach ($data as $str) { - $insert->execute(array($str)); -} -$insert = null; - -function max_len_step($context, $rownumber, $string) -{ - if (strlen($string) > $context) { - $context = strlen($string); - } - return $context; -} - -function max_len_finalize($context, $rownumber) -{ - return $context === null ? 0 : $context; -} - -$db->sqliteCreateAggregate('max_len', 'max_len_step', 'max_len_finalize'); - -var_dump($db->query('SELECT max_len(a) from strings')->fetchAll()); - -?> -]]> - - - - - この例では、 - テーブルのカラムの中で一番長い文字列の長さを計算する集約関数を作成します。 - 各行について max_len_step 関数がコールされ、 - $context パラメータが渡されます。 - このパラメータには、他の PHP 変数と同様に、配列やオブジェクトが設定されます。 - この例では、これまでに登場した値のうち長さが最大のものの長さを保持しています。 - $string が現在の最大値より長い場合に、 - その値で現在の最大値を更新します。 - - - すべての行に対する処理が終わると、SQLite は - max_len_finalize 関数をコールして集約結果を決定します。 - ここでは、$context の内容に基づいた、 - なんらかの計算を行うことができます。 - しかし、この例ではクエリを処理している過程で既に結果が決定しているので、 - ここでは単に context の値を返しているだけです。 - - - - 結果の値を context に溜め込んでおき、最後に一括して処理するという方法は推奨 - 「しません」。これは、SQLite のメモリ消費量が大きくなるからです。 - 仮に 32 バイトの長さのデータが百万件あったとして、 - それを溜め込むためにどれだけのメモリが必要になるか考えてみましょう。 - - - - - および - を使用して、 - SQLite のネイティブ SQL 関数を上書きすることができます。 - - - - - - - &reftitle.seealso; - - - - sqlite_create_function - sqlite_create_aggregate - - + + &info.method.alias; Pdo\Sqlite::createAggregate. + - - - および - を使用して、 - SQLite のネイティブ SQL 関数を上書きすることができます。 - - - - - - &reftitle.seealso; - - - - sqlite_create_function - sqlite_create_aggregate - - - - The Pdo\Sqlite class + Pdo\Sqlite クラス Pdo\Sqlite @@ -12,26 +12,25 @@
&reftitle.intro; - A PDO subclass representing a connection using - the SQLite PDO driver. + SQLite PDO ドライバによる接続を示す PDO サブクラスです。 - This driver supports a dedicated SQL query parser for the SQLite dialect. - It can handle the following: + このドライバは SQLite 方言向けに専用の SQL クエリパーサーをサポートしています。 + 次のものを処理可能です: - Single, double-quoted, and backtick literals, with doubling as escaping mechanism. + シングルクオート、ダブルクオート、バッククオートで囲まれたリテラルでのクオートの二重化によるエスケープ - Square brackets quoting for identifiers. + 識別子の角括弧によるクオート - Two-dashes and C-style comments (non-nested). + 2 つのハイフンとネストされていない C スタイルのコメント From 5727ee3db5a1a18a0eabc549c97d5c4fd469d4c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E7=94=B0=20=E6=86=B2=E5=A4=AA=E9=83=8E?= Date: Mon, 9 Dec 2024 21:08:11 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=E3=80=8C=E3=82=B3=E3=83=A1=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=80=8D=E3=80=8CC=E3=82=B9=E3=82=BF=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=80=8D=E3=81=AE=E6=94=B9=E5=96=84=E3=81=A8=E3=80=8C?= =?UTF-8?q?=E6=96=B0=E6=A9=9F=E8=83=BD=E3=80=8D=E3=81=B8=E3=81=AE=E3=83=90?= =?UTF-8?q?=E3=83=83=E3=82=AF=E3=83=9D=E3=83=BC=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- appendices/migration84/new-features.xml | 10 +++++----- reference/pdo_mysql/pdo-mysql.xml | 2 +- reference/pdo_pgsql/pdo-pgsql.xml | 4 ++-- reference/pdo_sqlite/pdo-sqlite.xml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/appendices/migration84/new-features.xml b/appendices/migration84/new-features.xml index b64e988a331..2e20bfaf1dc 100644 --- a/appendices/migration84/new-features.xml +++ b/appendices/migration84/new-features.xml @@ -375,7 +375,7 @@ $object = $reflector->newLazyGhost($initializer); シングルクオートやダブルクオートで囲まれたリテラルでのクオートの二重化によるエスケープ - 2 つのハイフンとネストされていない C スタイルのコメント + 2 つのハイフンによるコメント、ネストされていない C 言語形式のコメント @@ -396,7 +396,7 @@ $object = $reflector->newLazyGhost($initializer); バッククオートで囲まれたリテラルでのクオートの二重化によるエスケープ - 1 つの空白が続く 2 つのハイフン、ネストされていない C スタイルのコメント、 + 2 つのハイフンによるコメント、C 言語形式のコメント、 # によるコメント @@ -414,13 +414,13 @@ $object = $reflector->newLazyGhost($initializer); シングルクオートやダブルクオートで囲まれたリテラルでのクオートの二重化によるエスケープ - C スタイルの「エスケープ」文字列リテラル (E'string') + C 言語形式の「エスケープ」文字列リテラル (E'string') ドル記号で囲まれた文字列リテラル - 2 つのハイフンとネストされていない C スタイルのコメント + 2 つのハイフンによるコメント、ネストされていない C 言語形式のコメント ? 演算子のエスケープシーケンスとしての ?? のサポート @@ -444,7 +444,7 @@ $object = $reflector->newLazyGhost($initializer); 識別子の角括弧によるクオート - 2 つのハイフンとネストされていない C スタイルのコメント + 2 つのハイフンとネストされていない C 言語形式のコメント diff --git a/reference/pdo_mysql/pdo-mysql.xml b/reference/pdo_mysql/pdo-mysql.xml index 8affebdc06f..dd31c61d7bd 100644 --- a/reference/pdo_mysql/pdo-mysql.xml +++ b/reference/pdo_mysql/pdo-mysql.xml @@ -30,7 +30,7 @@ - 2 つのハイフン、C スタイルのコメント、# によるコメント + 2 つのハイフンによるコメント、C 言語形式のコメント、# によるコメント diff --git a/reference/pdo_pgsql/pdo-pgsql.xml b/reference/pdo_pgsql/pdo-pgsql.xml index d03952fd026..c4dd70df1a2 100644 --- a/reference/pdo_pgsql/pdo-pgsql.xml +++ b/reference/pdo_pgsql/pdo-pgsql.xml @@ -25,7 +25,7 @@ - C スタイルの「エスケープ」文字列リテラル + C 言語形式の「エスケープ」文字列リテラル @@ -35,7 +35,7 @@ - 2 つのハイフンとネストされていない C スタイルのコメント + 2 つのハイフンによるコメント、ネストされていない C 言語形式のコメント diff --git a/reference/pdo_sqlite/pdo-sqlite.xml b/reference/pdo_sqlite/pdo-sqlite.xml index 1493725aa23..dcd28d80f98 100644 --- a/reference/pdo_sqlite/pdo-sqlite.xml +++ b/reference/pdo_sqlite/pdo-sqlite.xml @@ -30,7 +30,7 @@ - 2 つのハイフンとネストされていない C スタイルのコメント + 2 つのハイフンによるコメント、ネストされていない C 言語形式のコメント From 1044fa7496873ed67cada081439156785229a327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E7=94=B0=20=E6=86=B2=E5=A4=AA=E9=83=8E?= Date: Mon, 9 Dec 2024 23:11:35 +0900 Subject: [PATCH 5/5] =?UTF-8?q?*C=20=E5=AE=9A=E6=95=B0*=20=E2=86=92=20*C?= =?UTF-8?q?=20=E8=A8=80=E8=AA=9E=E3=81=AE=E5=AE=9A=E6=95=B0*?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/pdo_firebird/pdo/firebird/getapiversion.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/pdo_firebird/pdo/firebird/getapiversion.xml b/reference/pdo_firebird/pdo/firebird/getapiversion.xml index 932258ccce6..8b4c86243ce 100644 --- a/reference/pdo_firebird/pdo/firebird/getapiversion.xml +++ b/reference/pdo_firebird/pdo/firebird/getapiversion.xml @@ -15,7 +15,7 @@ - ibase.h 内で C 定数 FB_API_VER として定義されている + ibase.h 内で C 言語の定数 FB_API_VER として定義されている Firebird API のバージョンを返します。