OmniSciDB
a5dc49c757
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
HeavySqlSanitizedString.java
Go to the documentation of this file.
1
package
com.mapd.parser.extension.ddl.heavysql;
2
3
import
org.apache.calcite.sql.SqlNode;
4
5
public
class
HeavySqlSanitizedString
{
6
private
String
string
;
7
8
public
HeavySqlSanitizedString
(
final
String s) {
9
this.string =
sanitizeString
(s);
10
}
11
12
public
HeavySqlSanitizedString
(
final
SqlNode node) {
13
this.string =
sanitizeString
(node.toString());
14
}
15
16
private
String
sanitizeString
(
final
String s) {
17
String sanitized_s = s;
18
if
(s.startsWith(
"'"
) && s.endsWith(
"'"
)) {
19
sanitized_s = s.substring(1, s.length() - 1);
20
}
else
if
(s.startsWith(
"\""
) && s.endsWith(
"\""
)) {
21
sanitized_s = s.substring(1, s.length() - 1);
22
}
23
sanitized_s = sanitized_s.replace(
"''"
,
"'"
);
24
return
sanitized_s;
25
}
26
27
@Override
28
public
String
toString
() {
29
return
string
;
30
}
31
}
com.mapd.parser.extension.ddl.heavysql.HeavySqlSanitizedString.string
String string
Definition:
HeavySqlSanitizedString.java:6
com.mapd.parser.extension.ddl.heavysql.HeavySqlSanitizedString.sanitizeString
String sanitizeString(final String s)
Definition:
HeavySqlSanitizedString.java:16
com.mapd.parser.extension.ddl.heavysql.HeavySqlSanitizedString.toString
String toString()
Definition:
HeavySqlSanitizedString.java:28
com.mapd.parser.extension.ddl.heavysql.HeavySqlSanitizedString
Definition:
HeavySqlSanitizedString.java:5
com.mapd.parser.extension.ddl.heavysql.HeavySqlSanitizedString.HeavySqlSanitizedString
HeavySqlSanitizedString(final SqlNode node)
Definition:
HeavySqlSanitizedString.java:12
com.mapd.parser.extension.ddl.heavysql.HeavySqlSanitizedString.HeavySqlSanitizedString
HeavySqlSanitizedString(final String s)
Definition:
HeavySqlSanitizedString.java:8
java
calcite
src
main
java
com
mapd
parser
extension
ddl
heavysql
HeavySqlSanitizedString.java
Generated on Tue Aug 27 2024 00:12:38 for OmniSciDB by
1.8.5