net.sf.saffron.sql.parser
Class ParserUtil

java.lang.Object
  |
  +--net.sf.saffron.sql.parser.ParserUtil

public final class ParserUtil
extends Object

Utility methods relating to parsing SQL.

Since:
Oct 7, 2003
Version:
$Id: //open/saffron/src/net/sf/saffron/sql/parser/ParserUtil.java#1 $
Author:
jhyde

Field Summary
static List emptyList
           
static SqlNode[] emptySqlNodeArray
           
static String[] emptyStringArray
           
 
Constructor Summary
private ParserUtil()
           
 
Method Summary
static Date parseDate(String s)
           
static Number parseInteger(String s)
           
static Number parseNumber(String s)
           
static String parseString(String s)
           
static Time parseTime(String s)
           
static Timestamp parseTimestamp(String s)
           
static String strip(String s, String quote)
          Unquotes a quoted string.
static SqlNode[] toNodeArray(List list)
           
static String[] toStringArray(List list)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

emptyStringArray

public static final String[] emptyStringArray

emptySqlNodeArray

public static final SqlNode[] emptySqlNodeArray

emptyList

public static final List emptyList
Constructor Detail

ParserUtil

private ParserUtil()
Method Detail

parseString

public static String parseString(String s)

parseNumber

public static Number parseNumber(String s)

parseInteger

public static Number parseInteger(String s)

parseDate

public static Date parseDate(String s)

parseTime

public static Time parseTime(String s)

parseTimestamp

public static Timestamp parseTimestamp(String s)

strip

public static String strip(String s,
                           String quote)
Unquotes a quoted string. For example, strip("'it''s got quotes'") returns "it's got quotes".


toStringArray

public static String[] toStringArray(List list)

toNodeArray

public static SqlNode[] toNodeArray(List list)

SourceForge.net_Logo