class FusionTablesV2::Table
Attributes
Public Class Methods
attribution string Attribution assigned to the table. writable attributionLink string Optional link for attribution. writable baseTableIds[] list Base table identifier if this table is a view or merged table.
columnPropertiesJsonSchema string Default JSON schema for validating all JSON column properties. writable columns[] list Columns in the table. writable description string Description assigned to the table. writable isExportable boolean Variable for whether table is exportable. writable kind string The kind of item this is. For table, this is always fusiontables#table.
name string Name assigned to a table. writable sql string SQL that encodes the table definition for derived tables.
tableId string Encrypted unique alphanumeric identifier for the table.
tablePropertiesJson string JSON object containing custom table properties. writable tablePropertiesJsonSchema string JSON schema for validating the JSON table properties.
# File lib/fusion_tables_v2.rb, line 23 def self.build(is_exportable: false, name:, db:) new_table = new new_table.db = db new_table.name = name new_table.columns = [] new_table.kind = 'fusiontables#table' new_table.is_exportable = is_exportable new_table end
Public Instance Methods
# File lib/fusion_tables_v2.rb, line 39 def datetime(column_name) columns << db.build_column(name: column_name, type: 'DATETIME', table: self) self end
# File lib/fusion_tables_v2.rb, line 44 def integer(column_name) columns << db.build_column(name: column_name, type: 'NUMBER', table: self) self end
# File lib/fusion_tables_v2.rb, line 49 def location(column_name) columns << db.build_column(name: column_name, type: 'LOCATION', table: self) self end
# File lib/fusion_tables_v2.rb, line 33 def string(column_name) puts db columns << db.build_column(name: column_name, type: 'STRING', table: self) self end