@@ -19,10 +19,6 @@ protected function setUp(): void
1919 $ this ->mysqlParser = new MySQL ();
2020 }
2121
22- // ---------------------------------------------------------------
23- // PostgreSQL Simple Query Protocol
24- // ---------------------------------------------------------------
25-
2622 /**
2723 * Build a PostgreSQL Simple Query ('Q') message
2824 *
@@ -189,10 +185,6 @@ public function testPgDo(): void
189185 $ this ->assertSame (QueryType::Write, $ this ->pgParser ->parse ($ data ));
190186 }
191187
192- // ---------------------------------------------------------------
193- // PostgreSQL Transaction Commands
194- // ---------------------------------------------------------------
195-
196188 public function testPgBeginTransaction (): void
197189 {
198190 $ data = $ this ->buildPgQuery ('BEGIN ' );
@@ -235,10 +227,6 @@ public function testPgSetCommand(): void
235227 $ this ->assertSame (QueryType::Transaction, $ this ->pgParser ->parse ($ data ));
236228 }
237229
238- // ---------------------------------------------------------------
239- // PostgreSQL Extended Query Protocol
240- // ---------------------------------------------------------------
241-
242230 public function testPgParseMessageRoutesToWrite (): void
243231 {
244232 $ data = $ this ->buildPgParse ('stmt1 ' , 'SELECT * FROM users ' );
@@ -257,10 +245,6 @@ public function testPgExecuteMessageRoutesToWrite(): void
257245 $ this ->assertSame (QueryType::Write, $ this ->pgParser ->parse ($ data ));
258246 }
259247
260- // ---------------------------------------------------------------
261- // PostgreSQL Edge Cases
262- // ---------------------------------------------------------------
263-
264248 public function testPgTooShortPacket (): void
265249 {
266250 $ this ->assertSame (QueryType::Unknown, $ this ->pgParser ->parse ('Q ' ));
@@ -272,10 +256,6 @@ public function testPgUnknownMessageType(): void
272256 $ this ->assertSame (QueryType::Unknown, $ this ->pgParser ->parse ($ data ));
273257 }
274258
275- // ---------------------------------------------------------------
276- // MySQL COM_QUERY Protocol
277- // ---------------------------------------------------------------
278-
279259 /**
280260 * Build a MySQL COM_QUERY packet
281261 *
@@ -393,10 +373,6 @@ public function testMysqlTruncate(): void
393373 $ this ->assertSame (QueryType::Write, $ this ->mysqlParser ->parse ($ data ));
394374 }
395375
396- // ---------------------------------------------------------------
397- // MySQL Transaction Commands
398- // ---------------------------------------------------------------
399-
400376 public function testMysqlBeginTransaction (): void
401377 {
402378 $ data = $ this ->buildMySQLQuery ('BEGIN ' );
@@ -427,10 +403,6 @@ public function testMysqlSetCommand(): void
427403 $ this ->assertSame (QueryType::Transaction, $ this ->mysqlParser ->parse ($ data ));
428404 }
429405
430- // ---------------------------------------------------------------
431- // MySQL Prepared Statement Protocol
432- // ---------------------------------------------------------------
433-
434406 public function testMysqlStmtPrepareRoutesToWrite (): void
435407 {
436408 $ data = $ this ->buildMySQLStmtPrepare ('SELECT * FROM users WHERE id = ? ' );
@@ -443,10 +415,6 @@ public function testMysqlStmtExecuteRoutesToWrite(): void
443415 $ this ->assertSame (QueryType::Write, $ this ->mysqlParser ->parse ($ data ));
444416 }
445417
446- // ---------------------------------------------------------------
447- // MySQL Edge Cases
448- // ---------------------------------------------------------------
449-
450418 public function testMysqlTooShortPacket (): void
451419 {
452420 $ this ->assertSame (QueryType::Unknown, $ this ->mysqlParser ->parse ("\x00\x00" ));
@@ -461,10 +429,6 @@ public function testMysqlUnknownCommand(): void
461429 $ this ->assertSame (QueryType::Unknown, $ this ->mysqlParser ->parse ($ data ));
462430 }
463431
464- // ---------------------------------------------------------------
465- // SQL Classification (classifySQL) — Edge Cases
466- // ---------------------------------------------------------------
467-
468432 public function testClassifyLeadingWhitespace (): void
469433 {
470434 $ this ->assertSame (QueryType::Read, $ this ->pgParser ->classifySQL (" \t\n SELECT * FROM users " ));
@@ -518,10 +482,6 @@ public function testClassifySelectWithSemicolon(): void
518482 $ this ->assertSame (QueryType::Read, $ this ->pgParser ->classifySQL ('SELECT; ' ));
519483 }
520484
521- // ---------------------------------------------------------------
522- // COPY Direction Classification
523- // ---------------------------------------------------------------
524-
525485 public function testClassifyCopyTo (): void
526486 {
527487 $ this ->assertSame (QueryType::Read, $ this ->pgParser ->classifySQL ('COPY users TO STDOUT ' ));
@@ -538,10 +498,6 @@ public function testClassifyCopyAmbiguous(): void
538498 $ this ->assertSame (QueryType::Write, $ this ->pgParser ->classifySQL ('COPY users ' ));
539499 }
540500
541- // ---------------------------------------------------------------
542- // CTE (WITH) Classification
543- // ---------------------------------------------------------------
544-
545501 public function testClassifyCteWithSelect (): void
546502 {
547503 $ sql = 'WITH active_users AS (SELECT * FROM users WHERE active = true) SELECT * FROM active_users ' ;
@@ -579,10 +535,6 @@ public function testClassifyCteNoFinalKeyword(): void
579535 $ this ->assertSame (QueryType::Read, $ this ->pgParser ->classifySQL ($ sql ));
580536 }
581537
582- // ---------------------------------------------------------------
583- // Keyword Extraction
584- // ---------------------------------------------------------------
585-
586538 public function testExtractKeywordSimple (): void
587539 {
588540 $ this ->assertSame ('SELECT ' , $ this ->pgParser ->extractKeyword ('SELECT * FROM users ' ));
@@ -613,10 +565,6 @@ public function testExtractKeywordParenthesized(): void
613565 $ this ->assertSame ('SELECT ' , $ this ->pgParser ->extractKeyword ('SELECT(1) ' ));
614566 }
615567
616- // ---------------------------------------------------------------
617- // Performance
618- // ---------------------------------------------------------------
619-
620568 public function testParsePerformance (): void
621569 {
622570 $ pgData = $ this ->buildPgQuery ('SELECT * FROM users WHERE id = 1 ' );
0 commit comments