public static class GroovyTranslator.LanguageTypeTranslator extends GroovyTranslator.DefaultTypeTranslator
GroovyTranslator.DefaultTypeTranslator that generates Gremlin that is compliant with
gremlin-language scripts. Specifically, it will convert Date and Timestamp to use the
datetime() function. Time zone offsets are resolved to where 2018-03-22T00:35:44.741+1600
would be converted to datetime('2018-03-21T08:35:44.741Z'). More commonly 2018-03-22 would simply
generate datetime('2018-03-22T00:00:00Z').
In addition, it prefers use of Vertex when producing a ReferenceVertex.ANONYMOUS_TRAVERSAL_PREFIX, script, withParameters| Constructor and Description |
|---|
LanguageTypeTranslator(boolean withParameters) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getSyntax(Date o)
Take the
Date argument and convert it to a string representation in the target language. |
protected String |
getSyntax(Number o)
Take the numeric argument and convert it to a string representation in the target language.
|
protected String |
getSyntax(Timestamp o)
Take the
Timestamp argument and convert it to a string representation in the target language. |
protected Script |
produceScript(Vertex o)
Take the
Vertex and writes the syntax directly to the member Translator.ScriptTranslator.AbstractTypeTranslator.script variable. |
getNullSyntax, getSyntax, getSyntax, getSyntax, getSyntax, getSyntax, getSyntax, getSyntax, produceScript, produceScript, produceScript, produceScript, produceScript, produceScript, produceScript, produceScript, produceScript, produceScriptapply, convertToScript, getAnonymousTraversalPrefixclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitandThenprotected String getSyntax(Date o)
Translator.ScriptTranslator.AbstractTypeTranslatorDate argument and convert it to a string representation in the target language.getSyntax in class GroovyTranslator.DefaultTypeTranslatorprotected String getSyntax(Timestamp o)
Translator.ScriptTranslator.AbstractTypeTranslatorTimestamp argument and convert it to a string representation in the target language.getSyntax in class GroovyTranslator.DefaultTypeTranslatorprotected Script produceScript(Vertex o)
Translator.ScriptTranslator.AbstractTypeTranslatorVertex and writes the syntax directly to the member Translator.ScriptTranslator.AbstractTypeTranslator.script variable.produceScript in class GroovyTranslator.DefaultTypeTranslatorprotected String getSyntax(Number o)
Translator.ScriptTranslator.AbstractTypeTranslatorNumber instance itself (i.e. Double, Integer, etc.)getSyntax in class GroovyTranslator.DefaultTypeTranslatorCopyright © 2013–2022 Apache Software Foundation. All rights reserved.