Package com.google.cloud.bigquery
Class Field
java.lang.Object
com.google.cloud.bigquery.Field
- All Implemented Interfaces:
Serializable
Google BigQuery Table schema field. A table field has a name, a type, a mode and possibly a
description.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static enum
Mode for a BigQuery Table field. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return the default value of the field.Returns the field description.Returns the maximum length of the field for STRING or BYTES type.getMode()
Returns the field mode.getName()
Returns the field name.Returns the policy tags for the field.Returns the maximum number of total digits allowed for NUMERIC or BIGNUMERIC types.getScale()
Returns the maximum number of digits set in the fractional part of a NUMERIC or BIGNUMERIC type.Returns the list of sub-fields ifgetType()
is aLegacySQLTypeName.RECORD
.getType()
Returns the field type.int
hashCode()
static Field.Builder
newBuilder
(String name, LegacySQLTypeName type, Field... subFields) Returns a builder for a Field object with given name and type.static Field.Builder
newBuilder
(String name, LegacySQLTypeName type, FieldList subFields) Returns a builder for a Field object with given name and type.static Field.Builder
newBuilder
(String name, StandardSQLTypeName type, Field... subFields) Returns a builder for a Field object with given name and type.static Field.Builder
newBuilder
(String name, StandardSQLTypeName type, FieldList subFields) Returns a builder for a Field object with given name and type.static Field
of
(String name, LegacySQLTypeName type, Field... subFields) Returns a Field object with given name and type.static Field
of
(String name, LegacySQLTypeName type, FieldList subFields) Returns a Field object with given name and type.static Field
of
(String name, StandardSQLTypeName type, Field... subFields) Returns a Field object with given name and type.static Field
of
(String name, StandardSQLTypeName type, FieldList subFields) Returns a Field object with given name and type.Returns a builder for theField
object.toString()
-
Method Details
-
getName
Returns the field name. -
getType
Returns the field type.- See Also:
-
getMode
Returns the field mode. By defaultField.Mode.NULLABLE
is used. -
getDescription
Returns the field description. -
getPolicyTags
Returns the policy tags for the field. -
getMaxLength
Returns the maximum length of the field for STRING or BYTES type. -
getScale
Returns the maximum number of digits set in the fractional part of a NUMERIC or BIGNUMERIC type. -
getPrecision
Returns the maximum number of total digits allowed for NUMERIC or BIGNUMERIC types. -
getDefaultValueExpression
Return the default value of the field. -
getCollation
-
getSubFields
-
toBuilder
Returns a builder for theField
object. -
toString
-
hashCode
public int hashCode() -
equals
-
of
Returns a Field object with given name and type. -
of
Returns a Field object with given name and type. -
of
Returns a Field object with given name and type. -
of
Returns a Field object with given name and type. -
newBuilder
Returns a builder for a Field object with given name and type. -
newBuilder
Returns a builder for a Field object with given name and type. -
newBuilder
Returns a builder for a Field object with given name and type. -
newBuilder
Returns a builder for a Field object with given name and type.
-