Class Command (0.6.1)
Stay organized with collections
Save and categorize content based on your preferences.
publicabstractclass CommandThis abstract class concerns itself with representing a method of matching a specific statement and translating it to a form that Spanner understands. The user should call is() to determine whether it matches before trying to translate.
Inherited Members
Static Methods
getCommands(String sql, Connection connection, JSONObject commandMetadataJSON)
publicstaticList<Command>getCommands(Stringsql,Connectionconnection,JSONObjectcommandMetadataJSON)The list of all subcommands to this command. When subclassing this, make sure to add the new command to the below list, if applicable (i.e.: if you want it to be run). Commands may also be specified via Dynamic Commands, which are defined from an input JSON file. These commands precede the hard-coded ones in execution.
org.json.simple.JSONObjectFields
matcher
protectedMatchermatchersql
protectedStringsqlMethods
getPattern()
protectedabstractPatterngetPattern()The pattern expected by this command: is() will only return true if it matches this pattern.
The pattern apposite (in relation to) the command.
is()
publicbooleanis()True if the SQL statement matches the pattern.
translate()
publicabstractStringtranslate()The equivalent Spanner statement for the specified SQL statement.