Package org.basex.query
Class QueryString
java.lang.Object
org.basex.query.QueryString
Query string builder.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a token wrapped with curly braces.Adds a token wrapped with square brackets.Adds concatenated tokens.Adds a function call.Adds parameters or function arguments.Adds a token wrapped with parentheses.quoted(byte[] value) Serializes a chopped version of the specified value with quotes.token(char ch) Adds a token.Adds a token.Adds multiple tokens.Adds multiple tokens, separated by the specified string.Adds multiple tokens, separated by the specified string.static byte[]toQuoted(byte[] value) Serializes a chopped version of the specified value with quotes.toString()static byte[]toValue(byte[] value) Serializes a chopped version of the specified value.value(byte[] value) Serializes a chopped version of the specified value.
-
Constructor Details
-
QueryString
public QueryString()
-
-
Method Details
-
token
Adds a token.- Parameters:
ch- character token to be added- Returns:
- self reference
-
token
Adds a token.- Parameters:
token- token to be added- Returns:
- self reference
-
function
Adds a function call.- Parameters:
function- called functionargs- function arguments- Returns:
- self reference
-
concat
Adds concatenated tokens.- Parameters:
tokens- tokens to be concatenated- Returns:
- self reference
-
tokens
Adds multiple tokens.- Parameters:
tokens- tokens to be added- Returns:
- self reference
-
tokens
Adds multiple tokens, separated by the specified string.- Parameters:
tokens- tokens to be addedseparator- separator string- Returns:
- self reference
-
tokens
Adds multiple tokens, separated by the specified string.- Parameters:
tokens- tokens to be addedseparator- separator stringparen- wrap with parentheses- Returns:
- self reference
-
params
Adds parameters or function arguments.- Parameters:
params- parameters to be added- Returns:
- self reference
-
paren
Adds a token wrapped with parentheses.- Parameters:
token- token to be added- Returns:
- self reference
-
brace
Adds a token wrapped with curly braces.- Parameters:
token- token to be added- Returns:
- self reference
-
bracket
Adds a token wrapped with square brackets.- Parameters:
token- token to be added- Returns:
- self reference
-
value
Serializes a chopped version of the specified value.- Parameters:
value- value- Returns:
- string
-
quoted
Serializes a chopped version of the specified value with quotes.- Parameters:
value- value- Returns:
- token
-
toString
-
toValue
public static byte[] toValue(byte[] value) Serializes a chopped version of the specified value.- Parameters:
value- value- Returns:
- string
-
toQuoted
public static byte[] toQuoted(byte[] value) Serializes a chopped version of the specified value with quotes.- Parameters:
value- value- Returns:
- token
-