-
public class SQLUtils
-
-
Field Summary
Fields Modifier and Type Field Description private final StringSINGLE_QUOTE_PLACE_HOLDERpublic final static SQLUtilsINSTANCE
-
Method Summary
Modifier and Type Method Description final StringsanitizeUrl(String url)Sanitize an url before it can be used in an X-SQL, e.g. final StringunsanitizeUrl(String sanitizedUrl)final StringloadConvertSQL(String fileResource)Load sql and convert column name A convert column name is like AS Breadcrumbs last link -> categoryfinal StringloadSQL(String fileResource)final StringgetSINGLE_QUOTE_PLACE_HOLDER()A single quote is replaced to be %27 by URLEncoder, to properly handle a url-encoded url, we should choose another place holder -
-
Method Detail
-
sanitizeUrl
final String sanitizeUrl(String url)
Sanitize an url before it can be used in an X-SQL, e.g. https://www.amazon.com/s?k=Baby+Girls'+One-Piece+Footies&rh=node:2475809011&page=1 is sanitized to be https://www.amazon.com/s?k=Baby+Girls^27+One-Piece+Footies&rh=node:2475809011&page=1
-
unsanitizeUrl
final String unsanitizeUrl(String sanitizedUrl)
-
loadConvertSQL
final String loadConvertSQL(String fileResource)
Load sql and convert column name A convert column name is like AS
Breadcrumbs last link -> category
-
getSINGLE_QUOTE_PLACE_HOLDER
final String getSINGLE_QUOTE_PLACE_HOLDER()
A single quote is replaced to be %27 by URLEncoder, to properly handle a url-encoded url, we should choose another place holder
-
-
-
-