org.postgresql.jdbc.EscapeSyntaxCallMode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jdbc-yugabytedb Show documentation
Show all versions of jdbc-yugabytedb Show documentation
Java JDBC 4.2 (JRE 8+) driver for YugaByte SQL database
The newest version!
/*
* Copyright (c) 2019, PostgreSQL Global Development Group
* See the LICENSE file in the project root for more information.
*/
package org.postgresql.jdbc;
/**
* Specifies whether a SELECT/CALL statement is used for the underlying SQL for JDBC escape call syntax: 'select' means to
* always use SELECT, 'callIfNoReturn' means to use CALL if there is no return parameter (otherwise use SELECT), and 'call' means
* to always use CALL.
*
* @see org.postgresql.PGProperty#ESCAPE_SYNTAX_CALL_MODE
*/
public enum EscapeSyntaxCallMode {
SELECT("select"),
CALL_IF_NO_RETURN("callIfNoReturn"),
CALL("call");
private final String value;
EscapeSyntaxCallMode(String value) {
this.value = value;
}
public static EscapeSyntaxCallMode of(String mode) {
for (EscapeSyntaxCallMode escapeSyntaxCallMode : values()) {
if (escapeSyntaxCallMode.value.equals(mode)) {
return escapeSyntaxCallMode;
}
}
return SELECT;
}
public String value() {
return value;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy