Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document new PDO classes and methods #4115

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Nov 20, 2024

Reference: https://wiki.php.net/rfc/pdo_driver_specific_subclasses and https://wiki.php.net/rfc/pdo_driver_specific_parsers

Still needs MySQLi, PGSQL, and OCI8 (although that one is going to be low priority)

@SakiTakamachi can you document, either as inline comments or in a follow-up PR the transaction attributes?

<section xml:id="pdo-sqlite.intro">
&reftitle.intro;
<simpara>
A concrete <classname>PDO</classname> subclass representing a connection
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "concrete" mean in this context?

</listitem>
<listitem>
<simpara>
Tests, as necessary.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What tests?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is taken from the RFC, @mbeccati can you clarify?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, in the context of the RFC I meant phpt tests for the custom syntax... so it doesn't belong here ;-)

<refnamediv>
<refname>Pdo\Sqlite::createAggregate</refname>
<refpurpose>
Registers an aggregating User Defined Function for use in SQL statements
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Registers an aggregating User Defined Function for use in SQL statements
Registers an aggregating user-defined function for use in SQL statements

<refnamediv>
<refname>Pdo\Sqlite::createCollation</refname>
<refpurpose>
Registers a User Defined Function for use as a collating function in SQL statements
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Registers a User Defined Function for use as a collating function in SQL statements
Registers a user-defined function for use as a collating function in SQL statements

<refnamediv>
<refname>Pdo\Sqlite::createFunction</refname>
<refpurpose>
Registers a User Defined Function for use in SQL statements
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Registers a User Defined Function for use in SQL statements
Registers a user-defined function for use in SQL statements

<refentry xml:id="pdo-sqlite.loadextension" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Pdo\Sqlite::loadExtension</refname>
<refpurpose>Description</refpurpose>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still work in progress?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is from a commit that adds stubs. because I don't know what this method does.

<refentry xml:id="pdo-firebird.getapiversion" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Pdo\Firebird::getApiVersion</refname>
<refpurpose>Get the API version </refpurpose>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<refpurpose>Get the API version </refpurpose>
<refpurpose>Get the API version</refpurpose>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
Return the FireBird API as an <type>int</type>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Return the FireBird API as an <type>int</type>.
Returns the FireBird API as an &integer;.

<refentry xml:id="pdo.connect" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<refnamediv>
<refname>PDO::connect</refname>
<refpurpose>Description</refpurpose>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing description.

</methodsynopsis>
<simpara>
Creates an instance of a <classname>PDO</classname> subclass for the
database being connection if it exists,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? What does it mean?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a class exists for the driver (e.g. mysql) it will return that instead of a generic PDO instance.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"... subclass for the corresponding PDO driver if it exists ..."

Comment on lines +133 to +134
<simpara>
</simpara>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<simpara>
</simpara>
<simpara>
Set transaction isolation level. , this can be one of <constant>Pdo\Firebird::READ_COMMITTED</constant>,
<constant>Pdo\Firebird::REPEATABLE_READ</constant> and <constant>Pdo\Firebird::SERIALIZABLE</constant>.
</simpara>

Comment on lines +140 to +141
<simpara>
</simpara>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<simpara>
</simpara>
<simpara>
Flag to denote the transaction isolation level is READ COMMITTED.
This flag is the default.
</simpara>

Comment on lines +147 to +148
<simpara>
</simpara>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<simpara>
</simpara>
<simpara>
Flag to denote the transaction isolation level is REPEATABLE READ.
</simpara>

Comment on lines +154 to +155
<simpara>
</simpara>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<simpara>
</simpara>
<simpara>
Flag to denote the transaction isolation level is SERIALIZABLE.
</simpara>

Comment on lines +161 to +162
<simpara>
</simpara>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<simpara>
</simpara>
<simpara>
Allow write operations to the database. Default is true.
</simpara>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants