Class Parser<T> (0.5.1)
Stay organized with collections
Save and categorize content based on your preferences.
publicabstractclass Parser<T>Parser is the parsing superclass, used to take wire format data types and convert them specifically to desired byte types. Each subclass is assigned with a specific type.
Inherited Members
Type Parameter
Static Fields
PG_EPOCH_DAYS
publicstaticfinallongPG_EPOCH_DAYSPG_EPOCH_SECONDS
publicstaticfinallongPG_EPOCH_SECONDSUTF8
protectedstaticfinalCharsetUTF8Static Methods
create(byte[] item, int oidType, Parser.FormatCode formatCode)
publicstaticParser<?>create(byte[]item,intoidType,Parser.FormatCodeformatCode)Factory method to create a Parser subtype with a designated type from a byte array.
create(ResultSet result, Type type, int columnarPosition)
publicstaticParser<?>create(ResultSetresult,Typetype,intcolumnarPosition)Factory method for parsing given a result set, for the specified column.
com.google.cloud.spanner.ResultSetThe result set object containing all data retrieved.
com.google.cloud.spanner.TypeThe type of the data to be parsed.
create(Object result, Type.Code typeCode)
protectedstaticParser<?>create(Objectresult,Type.CodetypeCode)Factory method for parsing generic data given a specified type.
com.google.cloud.spanner.Type.CodeThe type of the object to be parsed.
toOid(Type type)
publicstaticinttoOid(Typetype)Translates the given Cloud Spanner Type to a PostgreSQL OID constant.
com.google.cloud.spanner.Typethe type to translate
The OID constant value for the type
Constructors
Parser()
publicParser()Fields
item
protectedTitemMethods
binaryParse()
protectedabstractbyte[]binaryParse()Used to parse data type onto binary. Override this to change binary representation.
bind(Statement.Builder statementBuilder, String name)
publicabstractvoidbind(Statement.BuilderstatementBuilder,Stringname)com.google.cloud.spanner.Statement.Builderparse(ProxyServer.DataFormat format)
publicbyte[]parse(ProxyServer.DataFormatformat)Parses data based on specified data format (Spanner, text, or binary)
Byte format version of the input object.
spannerBinaryParse()
protectedbyte[]spannerBinaryParse()Binary representation of spanner string data.
spannerParse()
protectedStringspannerParse()Used to parse data type onto spanner format. Override this to change spanner representation.
Spanner string representation of data.
stringBinaryParse()
protectedbyte[]stringBinaryParse()Binary representation of string data.
stringParse()
protectedabstractStringstringParse()Used to parse data type into string. Override this to change the string representation.
String representation of data.