Skip to content

Commit 8734b2c

Browse files
committed
Correct documentation wording
1 parent ba1062a commit 8734b2c

12 files changed

Lines changed: 24 additions & 32 deletions

‎grammar-tools/MySQLParser.g4‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,7 +1902,7 @@ filterStringList:
19021902
;
19031903

19041904
filterWildDbTableString:
1905-
textStringNoLinebreak // sql_yacc.yy checks for the existance of at least one dot char in the string.
1905+
textStringNoLinebreak // sql_yacc.yy checks for the existence of at least one dot char in the string.
19061906
;
19071907

19081908
filterDbPairList:
@@ -3844,7 +3844,7 @@ dataType: // type in sql_yacc.yy
38443844
| type = NATIONAL_SYMBOL CHAR_SYMBOL VARYING_SYMBOL
38453845
| type = NCHAR_SYMBOL VARYING_SYMBOL
38463846
) fieldLength BINARY_SYMBOL?
3847-
/* @CHANGED: Moved "nchar fieldLength? BINARY_SYMBOL?" after othe nchar definitions to solve conflicts. */
3847+
/* @CHANGED: Moved "nchar fieldLength? BINARY_SYMBOL?" after the other nchar definitions to solve conflicts. */
38483848
| nchar fieldLength? BINARY_SYMBOL?
38493849
| type = VARBINARY_SYMBOL fieldLength
38503850
| type = YEAR_SYMBOL fieldLength? fieldOptions?

‎packages/mysql-on-sqlite/src/parser/class-wp-parser.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ private function parse_recursive( $rule_id ) {
5151
return false;
5252
}
5353

54-
// Bale out from processing the current branch if none of its rules can
54+
// Bail out from processing the current branch if none of its rules can
5555
// possibly match the current token.
5656
if ( isset( $this->grammar->lookahead_is_match_possible[ $rule_id ] ) ) {
5757
$token_id = $this->tokens[ $this->position ]->id;

‎packages/mysql-on-sqlite/src/sqlite/class-wp-mysql-on-sqlite-statement.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function getColumnMeta( int $column ) {
141141
* - PDO::FETCH_KEY_PAIR: key-value pair
142142
* - PDO::FETCH_OBJ: object (stdClass)
143143
* - PDO::FETCH_CLASS: object (custom class) [1-2 extra args]
144-
* - PDO::FETCH_INTO: update an exisisting object, can't be used with fetchAll() [1 extra arg]
144+
* - PDO::FETCH_INTO: update an existing object, can't be used with fetchAll() [1 extra arg]
145145
* - PDO::FETCH_LAZY: lazy fetch via PDORow, can't be used with fetchAll()
146146
* - PDO::FETCH_BOUND: bind values to PHP variables, can't be used with fetchAll()
147147
* - PDO::FETCH_FUNC: custom function, only works with fetchAll(), can't be default [1 extra arg]
@@ -391,7 +391,7 @@ public function bindValue( $param, $value, $type = PDO::PARAM_STR ): bool {
391391
/**
392392
* Dump information about the statement.
393393
*
394-
* Dupms the SQL query and parameters information.
394+
* Dumps the SQL query and parameter information.
395395
*
396396
* @return bool|null Returns null, or false on failure.
397397
*/

‎packages/mysql-on-sqlite/src/sqlite/class-wp-mysql-on-sqlite.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ function ( $key ) {
886886
* with SQLite versions < 3.37.0 when "PRAGMA writable_schema" is
887887
* set to "ON", which also enables error-tolerant schema parsing.
888888
*
889-
* This is an unsafe opt-in feature for special back compatibility
889+
* This is an unsafe opt-in feature for special backward compatibility
890890
* use cases, as it can corrupt the database by allowing incorrect
891891
* types into STRICT tables. Additionally, depending on the legacy
892892
* SQLite version used, there is no guarantee that all features of
@@ -2338,7 +2338,7 @@ private function execute_insert_or_replace_statement( WP_Parser_Node $node ): vo
23382338
* ON CONFLICT clause differently, and at this stage, we only
23392339
* save the translated update list to a variable.
23402340
*
2341-
* See bellow at "Handle ON CONFLICT clause for SQLite < 3.35.0".
2341+
* See below at "Handle ON CONFLICT clause for SQLite < 3.35.0".
23422342
*/
23432343
$sqlite_version = $this->get_sqlite_version();
23442344
if ( version_compare( $sqlite_version, '3.35.0', '<' ) ) {
@@ -3912,7 +3912,7 @@ private function execute_set_system_variable_statement(
39123912
/*
39133913
* Handle ON/OFF values. They are accepted as both strings and keywords.
39143914
*
3915-
* @TODO: This is actually variable-specific and depends on the its type.
3915+
* @TODO: This is actually variable-specific and depends on its type.
39163916
* For example:
39173917
* SET autocommit = OFF; SELECT @@autocommit; -> 0
39183918
* SET autocommit = false; SELECT @@autocommit; -> 0
@@ -4819,7 +4819,7 @@ private function translate_simple_expr_body( WP_Parser_Node $node ): string {
48194819
return $this->translate_cast_expr( $expr, $cast_type );
48204820
} else {
48214821
// CONVERT(expr USING charset): Keep "expr" as is (no SQLite support).
4822-
// TODO: Consider rejecting UTF-8-incompatible charasets.
4822+
// TODO: Consider rejecting UTF-8-incompatible charsets.
48234823
return $this->translate( $expr );
48244824
}
48254825
}

‎packages/mysql-on-sqlite/src/sqlite/class-wp-sqlite-connection.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function __construct( array $options ) {
148148
*
149149
* The synchronous=NORMAL setting provides the best balance between
150150
* performance and safety for most applications running in WAL mode.
151-
* You lose durability across power lose with synchronous NORMAL in WAL
151+
* You lose durability across power loss with synchronous NORMAL in WAL
152152
* mode, but that is not important for most applications. Transactions
153153
* are still atomic, consistent, and isolated, which are the most
154154
* important characteristics in most use cases.

‎packages/mysql-on-sqlite/src/sqlite/class-wp-sqlite-driver.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010

1111
/**
12-
* For back compatibility with dependencies that use their own loader scripts
12+
* For backward compatibility with dependencies that use their own loader scripts
1313
* (e.g., WP CLI SQLite Command), ensure the PDO-based classes are loaded.
1414
*/
1515
require_once __DIR__ . '/class-wp-mysql-on-sqlite.php';
@@ -261,7 +261,7 @@ public function beginTransaction(): void {
261261
}
262262

263263
/**
264-
* A temporary alias for back compatibility.
264+
* A temporary alias for backward compatibility.
265265
*
266266
* @see self::beginTransaction()
267267
*/

‎packages/mysql-on-sqlite/src/sqlite/class-wp-sqlite-information-schema-reconstructor.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
*/
77

88
/**
9-
* SQLite information schema recconstructor for MySQL.
9+
* SQLite information schema reconstructor for MySQL.
1010
*
1111
* This class checks and reconstructs the MySQL INFORMATION_SCHEMA data in SQLite
1212
* when it becomes out of sync with the actual SQLite database schema.
1313
*
14-
* Currently, it reconstructs schema infromation for missing tables, and removes
14+
* Currently, it reconstructs schema information for missing tables, and removes
1515
* stale data for tables that no longer exist. When used with WordPress, it uses
1616
* the "wp_get_db_schema()" function to reconstruct WordPress table information.
1717
*
@@ -768,7 +768,7 @@ private function get_mysql_column_type( string $column_type ): string {
768768
* See WP_MySQL_On_SQLite::quote_mysql_utf8_string_literal().
769769
*
770770
* TODO: This is a copy of WP_MySQL_On_SQLite::quote_mysql_utf8_string_literal().
771-
* We may consider extracing it to reusable MySQL helpers.
771+
* We may consider extracting it to reusable MySQL helpers.
772772
*
773773
* @param string $utf8_literal The UTF-8 string literal to escape.
774774
* @return string The escaped string literal.

‎packages/mysql-on-sqlite/src/sqlite/class-wp-sqlite-pdo-user-defined-functions.php‎

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,17 @@
44
*/
55

66
/**
7-
* This class defines user defined functions(UDFs) for PDO library.
7+
* Registers MySQL-compatible functions with PDO SQLite.
88
*
9-
* These functions replace those used in the SQL statement with the PHP functions.
10-
*
11-
* Usage:
12-
*
13-
* <code>
14-
* new WP_SQLite_PDO_User_Defined_Functions(ref_to_pdo_obj);
15-
* </code>
16-
*
17-
* This automatically enables ref_to_pdo_obj to replace the function in the SQL statement
18-
* to the ones defined here.
9+
* Each callback implements a MySQL SQL function that SQLite does not provide.
1910
*
2011
* @access private
2112
*/
2213
class WP_SQLite_PDO_User_Defined_Functions {
2314

2415
/**
25-
* Registers the user defined functions for SQLite to a PDO instance.
16+
* Register the user-defined SQLite functions on a PDO connection.
17+
*
2618
* The functions are registered using PDO::sqliteCreateFunction().
2719
*
2820
* @param PDO|PDO\SQLite $pdo The PDO object.
@@ -952,7 +944,7 @@ public function reverse( $str ) {
952944
}
953945

954946
/**
955-
* A helper to covert LIKE pattern to a GLOB pattern for "LIKE BINARY" support.
947+
* A helper to convert a LIKE pattern to a GLOB pattern for "LIKE BINARY" support.
956948
957949
* @TODO: Some of the MySQL string specifics described below are likely to
958950
* affect also other patterns than just "LIKE BINARY". We should

‎packages/mysql-on-sqlite/tests/bootstrap.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require_once __DIR__ . '/wp-sqlite-schema.php';
44
require_once __DIR__ . '/../src/load.php';
55

6-
// When on an older SQLite version, enable unsafe back compatibility.
6+
// When on an older SQLite version, enable unsafe backward compatibility.
77
$sqlite_version = ( new PDO( 'sqlite::memory:' ) )->query( 'SELECT SQLITE_VERSION();' )->fetch()[0];
88
if ( version_compare( $sqlite_version, WP_MySQL_On_SQLite::MINIMUM_SQLITE_VERSION, '<' ) ) {
99
define( 'WP_SQLITE_UNSAFE_ENABLE_UNSUPPORTED_VERSIONS', true );

‎packages/mysql-proxy/src/class-mysql-protocol.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class MySQL_Protocol {
2222
const CLIENT_LONG_PASSWORD = 1 << 0; // [NOT USED] Use improved version of old authentication.
2323
const CLIENT_FOUND_ROWS = 1 << 1; // Send found rows instead of affected rows in EOF packet.
2424
const CLIENT_LONG_FLAG = 1 << 2; // Get all column flags.
25-
const CLIENT_CONNECT_WITH_DB = 1 << 3; // Database can be specified in handshake reponse packet.
25+
const CLIENT_CONNECT_WITH_DB = 1 << 3; // Database can be specified in handshake response packet.
2626
const CLIENT_NO_SCHEMA = 1 << 4; // [DEPRECATED] Don't allow "database.table.column".
2727
const CLIENT_COMPRESS = 1 << 5; // Compression protocol supported.
2828
const CLIENT_ODBC = 1 << 6; // Special handling of ODBC behavior. None since 3.22.

0 commit comments

Comments
 (0)