Skip to content

Commit fcb2cf3

Browse files
committed
Namespace-prefix the WIP SQLite driver for now to avoid naming conflicts
1 parent 14f98b0 commit fcb2cf3

File tree

6 files changed

+29
-0
lines changed

6 files changed

+29
-0
lines changed

tests/tools/dump-sqlite-query.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
require_once __DIR__ . '/../../wp-includes/sqlite-ast/class-wp-sqlite-token.php';
1313
require_once __DIR__ . '/../../wp-includes/sqlite-ast/class-wp-sqlite-query-builder.php';
1414

15+
use WIP\WP_SQLite_Driver;
16+
1517
$grammar_data = include __DIR__ . '/../../wp-includes/mysql/mysql-grammar.php';
1618
$grammar = new WP_Parser_Grammar( $grammar_data );
1719
$driver = new WP_SQLite_Driver( $grammar );

wp-includes/sqlite-ast/class-wp-sqlite-driver.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
// @TODO: Remove the namespace and use statements when replacing the old driver.
4+
namespace WIP;
5+
6+
use Exception;
7+
use PDO;
8+
use WP_MySQL_Lexer;
9+
use WP_MySQL_Parser;
10+
use WP_MySQL_Token;
11+
use WP_Parser_Grammar;
12+
use WP_Parser_Node;
13+
314
class WP_SQLite_Driver {
415
private $grammar;
516
private $has_sql_calc_found_rows = false;

wp-includes/sqlite-ast/class-wp-sqlite-expression.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
22

3+
// @TODO: Remove the namespace and use statements when replacing the old driver.
4+
namespace WIP;
5+
36
class WP_SQLite_Expression {
47
public $elements;
58

wp-includes/sqlite-ast/class-wp-sqlite-query-builder.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
22

3+
// @TODO: Remove the namespace and use statements when replacing the old driver.
4+
namespace WIP;
5+
6+
use InvalidArgumentException;
7+
38
class WP_SQLite_Query_Builder {
49
private $expression;
510

wp-includes/sqlite-ast/class-wp-sqlite-token-factory.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
22

3+
// @TODO: Remove the namespace and use statements when replacing the old driver.
4+
namespace WIP;
5+
6+
use InvalidArgumentException;
7+
38
class WP_SQLite_Token_Factory {
49
private static $valid_types = array(
510
WP_SQLite_Token::TYPE_RAW,

wp-includes/sqlite-ast/class-wp-sqlite-token.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
22

3+
// @TODO: Remove the namespace and use statements when replacing the old driver.
4+
namespace WIP;
5+
36
class WP_SQLite_Token {
47
const TYPE_RAW = 'TYPE_RAW';
58
const TYPE_IDENTIFIER = 'TYPE_IDENTIFIER';

0 commit comments

Comments
 (0)