Skip to content

Commit df7b4a2

Browse files
committed
fix: added missingstup for pg_query_is_utility_stmt method of pg-query-extension
1 parent df5d8ad commit df7b4a2

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/lib/postgresql/src/stubs.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,21 @@ function pg_query_summary(string $sql, int $options = 0, int $truncate_limit = 0
158158
throw new \RuntimeException('pg_query extension is not loaded');
159159
}
160160

161+
/**
162+
* Check if SQL statement is a utility statement (DDL).
163+
*
164+
* Utility statements include DDL commands like CREATE, ALTER, DROP, GRANT, etc.
165+
* as opposed to DML statements like SELECT, INSERT, UPDATE, DELETE.
166+
*
167+
* @param string $sql The SQL query to check
168+
*
169+
* @return bool TRUE if the statement is a utility statement, FALSE otherwise
170+
*/
171+
function pg_query_is_utility_stmt(string $sql) : bool
172+
{
173+
throw new \RuntimeException('pg_query extension is not loaded');
174+
}
175+
161176
/* Parse mode constants */
162177
\define('PG_QUERY_PARSE_DEFAULT', 0);
163178
\define('PG_QUERY_PARSE_TYPE_NAME', 1);

0 commit comments

Comments
 (0)