Java SQL Type getNextQuotes(String lastQuotes, int lastType)

Here you can find the source of getNextQuotes(String lastQuotes, int lastType)

Description

get Next Quotes

License

Apache License

Declaration

private static String getNextQuotes(String lastQuotes, int lastType) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.sql.Types;

public class Main {
    private static String getNextQuotes(String lastQuotes, int lastType) {
        StringBuffer quotes = new StringBuffer();
        if (lastQuotes.length() == 0) {
            return "\"";
        } else {/*  w w w.j  av a  2  s.c  om*/
            if (lastType == Types.ARRAY) {
                int length = lastQuotes.length();

                for (int i = 0; i < length; ++i) {
                    quotes.append('\\');
                }

                quotes.append(lastQuotes);
            } else {
                quotes.append(lastQuotes).append(lastQuotes);
            }

            return quotes.toString();
        }
    }
}

Related

  1. getMBTileData(int column, int row, int zoomLevel, String jdbcConnectionString)
  2. getMBTileData(int column, int row, int zoomLevel, String jdbcConnectionString)
  3. getMessages(Array arr)
  4. getNameByType(int sqlType)
  5. getNameFromJdbcType(int jdbcType)
  6. getNumberType(Integer precision, Integer scale)
  7. getNumTypeWidth(int type)
  8. getObject(int sqlType, String value)
  9. getObjectType(Object param)