Here you can find the source of quoteRemarkSQL(String sql)
Parameter | Description |
---|---|
sql | the string |
public static String quoteRemarkSQL(String sql)
//package com.java2s; /*/*from w ww . j a v a2 s . c o m*/ * Copyright 2004-2013 H2 Group. Multiple-Licensed under the H2 License, * Version 1.0, and under the Eclipse Public License, Version 1.0 * (http://h2database.com/html/license.html). * Initial Developer: H2 Group * * Nicolas Fortin, Atelier SIG, IRSTV FR CNRS 24888 * Support for the operator "&&" as an alias for SPATIAL_INTERSECTS */ public class Main { /** * In a string, replace block comment marks with /++ .. ++/. * * @param sql the string * @return the resulting string */ public static String quoteRemarkSQL(String sql) { while (true) { int idx = sql.indexOf("*/"); if (idx < 0) { break; } sql = sql.substring(0, idx) + "++/" + sql.substring(idx + 2); } while (true) { int idx = sql.indexOf("/*"); if (idx < 0) { break; } sql = sql.substring(0, idx) + "/++" + sql.substring(idx + 2); } return sql; } }