Send feedback
Class PostgreSQLStatementParser (6.74.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version 6.74.1 keyboard_arrow_down
public class PostgreSQLStatementParser extends AbstractStatementParser
Methods
checkReturningClauseInternal(String rawSql)
protected boolean checkReturningClauseInternal(String rawSql)
Checks if the given SQL string contains a Returning clause. This method is used only in case of
a DML statement.
Parameter
Name
Description
rawSql
String
Overrides
getQueryParameters(String sql)
public Set<String> getQueryParameters(String sql)
Note: This is an internal API and breaking changes can be made without prior notice.
Returns the PostgreSQL-style query parameters ($1, $2, ...) in the given SQL string. The
SQL-string is allowed to contain comments. Occurrences of query-parameter like strings inside
quoted identifiers or string literals are ignored.
The following example will return a set containing ("$1", "$2").
select col1, col2, "col$4"
from some_table
where col1=$1 and col2=$2
and not col3=$1 and col4='$3'
Parameter
Name
Description
sql
String
the SQL-string to check for parameters.
Returns
Type
Description
Set <String >
A set containing all the parameters in the SQL-string.
supportsExplain()
protected boolean supportsExplain()
Indicates whether the parser supports the EXPLAIN
clause. The PostgreSQL parser does
not support it.
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-04 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-10-04 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-04 UTC."]]