OpenAPI 1.0

com.aquafold.openapi.rdbms.util
Interface AQScriptParser


public interface AQScriptParser

AQScriptParser

Synopsis:

A collection of methods for parsing SQL statements.

Description:
The method parse(), lets the user parse a SQL script that has server statements into a list of individual SQL statements.


Method Summary
 String[] parse(String scriptText)
          Creates a list of SQL statements base on a SQL script specified.
 void setAtSeparator(boolean value)
          To set the statement separator as a "@".
 void setSemiColonSeparator(boolean value)
          To set the statement separator as a ";".
 void setServerSideCommentIsBlock(boolean value)
          To set the server side comment as a "/* ...
 void setServerSideCommentIsDoubleDash(boolean value)
          To set the server side comment as a "--".
 void setServerSideCommentIsDoubleSlash(boolean value)
          To set the server side comment as a "//".
 void setSlashSeparator(boolean value)
          To set the statement separator as a "/".
 

Method Detail

parse

String[] parse(String scriptText)
Creates a list of SQL statements base on a SQL script specified. The default statement separator is a single line containing the word "GO".

Parameters:
scriptText - A string representing the script.
Returns:
An array of SQL statements

setServerSideCommentIsBlock

void setServerSideCommentIsBlock(boolean value)
To set the server side comment as a "/* ... */" comment block.

Parameters:
value - true if you want to use "/* ... */" as comment block; false otherwise.

setServerSideCommentIsDoubleSlash

void setServerSideCommentIsDoubleSlash(boolean value)
To set the server side comment as a "//".

Parameters:
value - boolean - true if you want to use "//" as a comment; false otherwise.

setServerSideCommentIsDoubleDash

void setServerSideCommentIsDoubleDash(boolean value)
To set the server side comment as a "--".

Parameters:
value - true if you want to use "--" as a comment; false otherwise.

setSemiColonSeparator

void setSemiColonSeparator(boolean value)
To set the statement separator as a ";". By default, ";" is not a separator.

Parameters:
value - true if you want to use ";" as a separator; false otherwise.

setSlashSeparator

void setSlashSeparator(boolean value)
To set the statement separator as a "/". By default, "/" is not a separator. When this is set, both "GO" and "/" are used as separators.

Parameters:
value - true if you want to use "/" as a separator; false otherwise.

setAtSeparator

void setAtSeparator(boolean value)
To set the statement separator as a "@". By default, "@" is not a separator

Parameters:
value - true if you want to use "@" as a separator; false otherwise.

OpenAPI 1.0


Copyright © 2010 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.