enum Google::Cloud::BigQuery::JobConfiguration::Load::SourceFormat

Defined in:

cloud/big_query.cr

Enum Members

CSV = 0
NEWLINE_DELIMITED_JSON = 1
AVRO = 2
PARQUET = 3
ORC = 4
DATASTORE_BACKUP = 5

Instance Method Summary

Instance Method Detail

def avro? #

Returns true if this enum value equals AVRO


[View source]
def csv? #

Returns true if this enum value equals CSV


[View source]
def datastore_backup? #

Returns true if this enum value equals DATASTORE_BACKUP


[View source]
def newline_delimited_json? #

Returns true if this enum value equals NEWLINE_DELIMITED_JSON


[View source]
def orc? #

Returns true if this enum value equals ORC


[View source]
def parquet? #

Returns true if this enum value equals PARQUET


[View source]
def to_json(json : JSON::Builder) #
Description copied from struct Enum

Serializes this enum member by name.

For non-flags enums, the serialization is a JSON string. The value is the member name (see #to_s) transformed with String#underscore.

enum Stages
  INITIAL
  SECOND_STAGE
end

Stages::INITIAL.to_json      # => %("initial")
Stages::SECOND_STAGE.to_json # => %("second_stage")

For flags enums, the serialization is a JSON array including every flagged member individually serialized in the same way as a member of a non-flags enum. None is serialized as an empty array, All as an array containing all members.

@[Flags]
enum Sides
  LEFT
  RIGHT
end

Sides::LEFT.to_json                  # => %(["left"])
(Sides::LEFT | Sides::RIGHT).to_json # => %(["left","right"])
Sides::All.to_json                   # => %(["left","right"])
Sides::None.to_json                  # => %([])

ValueConverter.to_json offers a different serialization strategy based on the member value.


[View source]