Class: Yamori::Schema::Field
- Inherits:
-
Object
- Object
- Yamori::Schema::Field
- Defined in:
- lib/yamori/schema.rb
Constant Summary collapse
- PicklistValue =
Data.define(:active, :default_value, :label, :valid_for, :value)
Instance Method Summary collapse
- #aggregatable? ⇒ Boolean
- #ai_prediction_field? ⇒ Boolean
- #autoNumber? ⇒ Boolean
- #byteLength ⇒ Object
- #calculated? ⇒ Boolean
- #calculated_formula ⇒ Object
- #cascade_delete? ⇒ Boolean
- #case_sensitive ⇒ Object
- #compound_field_name ⇒ Object
- #controller_name ⇒ Object
- #createable? ⇒ Boolean
- #custom? ⇒ Boolean
- #default_value ⇒ Object
- #default_value_formula ⇒ Object
- #defaulted_on_create? ⇒ Boolean
- #dependent_picklist? ⇒ Boolean
- #deprecated_and_hidden? ⇒ Boolean
- #digits ⇒ Object
- #display_location_in_decimal? ⇒ Boolean
- #encrypted? ⇒ Boolean
- #external_id? ⇒ Boolean
- #extra_type_info ⇒ Object
- #filterable? ⇒ Boolean
- #filtered_lookup_info ⇒ Object
- #formula_treat_null_number_as_zero? ⇒ Boolean
- #groupable? ⇒ Boolean
- #high_scale_number? ⇒ Boolean
- #html_formatted? ⇒ Boolean
- #id_lookup? ⇒ Boolean
-
#initialize(field) ⇒ Field
constructor
A new instance of Field.
- #inline_help_text ⇒ Object
- #label ⇒ Object
- #length ⇒ Object
- #mask ⇒ Object
- #mask_type ⇒ Object
- #name ⇒ Object
- #name_field? ⇒ Boolean
- #name_pointing? ⇒ Boolean
- #nillable? ⇒ Boolean
- #permissionable? ⇒ Boolean
- #picklist_values ⇒ Object
- #polymorphic_foreign_key? ⇒ Boolean
- #precision ⇒ Object
- #query_by_distance? ⇒ Boolean
- #reference_target_field ⇒ Object
- #reference_to ⇒ Object
- #relationship_name ⇒ Object
- #relationship_order ⇒ Object
- #restricted_delete ⇒ Object
- #restricted_picklist? ⇒ Boolean
- #scale ⇒ Object
- #search_prefilterable? ⇒ Boolean
- #soapType ⇒ Object
- #sortable? ⇒ Boolean
- #to_h ⇒ Object
- #type ⇒ Object
- #unique? ⇒ Boolean
- #updateable? ⇒ Boolean
- #write_Requires_Master_Read? ⇒ Boolean
Constructor Details
#initialize(field) ⇒ Field
Returns a new instance of Field.
299 300 301 |
# File 'lib/yamori/schema.rb', line 299 def initialize(field) @field = field end |
Instance Method Details
#aggregatable? ⇒ Boolean
303 304 305 |
# File 'lib/yamori/schema.rb', line 303 def aggregatable? field["aggregatable"] end |
#ai_prediction_field? ⇒ Boolean
307 308 309 |
# File 'lib/yamori/schema.rb', line 307 def ai_prediction_field? field["aiPredictionField"] end |
#autoNumber? ⇒ Boolean
311 312 313 |
# File 'lib/yamori/schema.rb', line 311 def autoNumber? field["autoNumber"] end |
#byteLength ⇒ Object
315 316 317 |
# File 'lib/yamori/schema.rb', line 315 def byteLength field["byteLength"] end |
#calculated? ⇒ Boolean
319 320 321 |
# File 'lib/yamori/schema.rb', line 319 def calculated? field["calculated"] end |
#calculated_formula ⇒ Object
323 324 325 |
# File 'lib/yamori/schema.rb', line 323 def calculated_formula field["calculatedFormula"] end |
#cascade_delete? ⇒ Boolean
327 328 329 |
# File 'lib/yamori/schema.rb', line 327 def cascade_delete? field["cascadeDelete"] end |
#case_sensitive ⇒ Object
331 332 333 |
# File 'lib/yamori/schema.rb', line 331 def case_sensitive field["caseSensitive"] end |
#compound_field_name ⇒ Object
335 336 337 |
# File 'lib/yamori/schema.rb', line 335 def compound_field_name field["compoundFieldName"] end |
#controller_name ⇒ Object
339 340 341 |
# File 'lib/yamori/schema.rb', line 339 def controller_name field["controllerName"] end |
#createable? ⇒ Boolean
343 344 345 |
# File 'lib/yamori/schema.rb', line 343 def createable? field["createable"] end |
#custom? ⇒ Boolean
347 348 349 |
# File 'lib/yamori/schema.rb', line 347 def custom? field["custom"] end |
#default_value ⇒ Object
351 352 353 |
# File 'lib/yamori/schema.rb', line 351 def default_value field["defaultValue"] end |
#default_value_formula ⇒ Object
355 356 357 |
# File 'lib/yamori/schema.rb', line 355 def default_value_formula field["defaultValueFormula"] end |
#defaulted_on_create? ⇒ Boolean
359 360 361 |
# File 'lib/yamori/schema.rb', line 359 def defaulted_on_create? field["defaultedOnCreate"] end |
#dependent_picklist? ⇒ Boolean
363 364 365 |
# File 'lib/yamori/schema.rb', line 363 def dependent_picklist? field["dependentPicklist"] end |
#deprecated_and_hidden? ⇒ Boolean
367 368 369 |
# File 'lib/yamori/schema.rb', line 367 def deprecated_and_hidden? field["deprecatedAndHidden"] end |
#digits ⇒ Object
371 372 373 |
# File 'lib/yamori/schema.rb', line 371 def digits field["digits"] end |
#display_location_in_decimal? ⇒ Boolean
375 376 377 |
# File 'lib/yamori/schema.rb', line 375 def display_location_in_decimal? field["displayLocationInDecimal"] end |
#encrypted? ⇒ Boolean
379 380 381 |
# File 'lib/yamori/schema.rb', line 379 def encrypted? field["encrypted"] end |
#external_id? ⇒ Boolean
383 384 385 |
# File 'lib/yamori/schema.rb', line 383 def external_id? field["externalId"] end |
#extra_type_info ⇒ Object
387 388 389 |
# File 'lib/yamori/schema.rb', line 387 def extra_type_info field["extraTypeInfo"] end |
#filterable? ⇒ Boolean
391 392 393 |
# File 'lib/yamori/schema.rb', line 391 def filterable? field["filterable"] end |
#filtered_lookup_info ⇒ Object
395 396 397 |
# File 'lib/yamori/schema.rb', line 395 def filtered_lookup_info field["filteredLookupInfo"] end |
#formula_treat_null_number_as_zero? ⇒ Boolean
399 400 401 |
# File 'lib/yamori/schema.rb', line 399 def formula_treat_null_number_as_zero? field["formulaTreatNullNumberAsZero"] end |
#groupable? ⇒ Boolean
403 404 405 |
# File 'lib/yamori/schema.rb', line 403 def groupable? field["groupable"] end |
#high_scale_number? ⇒ Boolean
407 408 409 |
# File 'lib/yamori/schema.rb', line 407 def high_scale_number? field["highScaleNumber"] end |
#html_formatted? ⇒ Boolean
411 412 413 |
# File 'lib/yamori/schema.rb', line 411 def html_formatted? field["htmlFormatted"] end |
#id_lookup? ⇒ Boolean
415 416 417 |
# File 'lib/yamori/schema.rb', line 415 def id_lookup? field["idLookup"] end |
#inline_help_text ⇒ Object
419 420 421 |
# File 'lib/yamori/schema.rb', line 419 def inline_help_text field["inlineHelpText"] end |
#label ⇒ Object
423 424 425 |
# File 'lib/yamori/schema.rb', line 423 def label field["label"] end |
#length ⇒ Object
427 428 429 |
# File 'lib/yamori/schema.rb', line 427 def length field["length"] end |
#mask ⇒ Object
431 432 433 |
# File 'lib/yamori/schema.rb', line 431 def mask field["mask"] end |
#mask_type ⇒ Object
435 436 437 |
# File 'lib/yamori/schema.rb', line 435 def mask_type field["maskType"] end |
#name ⇒ Object
439 440 441 |
# File 'lib/yamori/schema.rb', line 439 def name field["name"] end |
#name_field? ⇒ Boolean
443 444 445 |
# File 'lib/yamori/schema.rb', line 443 def name_field? field["nameField"] end |
#name_pointing? ⇒ Boolean
447 448 449 |
# File 'lib/yamori/schema.rb', line 447 def name_pointing? field["namePointing"] end |
#nillable? ⇒ Boolean
451 452 453 |
# File 'lib/yamori/schema.rb', line 451 def nillable? field["nillable"] end |
#permissionable? ⇒ Boolean
455 456 457 |
# File 'lib/yamori/schema.rb', line 455 def field["permissionable"] end |
#picklist_values ⇒ Object
461 462 463 464 465 466 467 468 469 470 471 |
# File 'lib/yamori/schema.rb', line 461 def picklist_values field["picklistValues"].map do |value| PicklistValue.new( active: value['active'], default_value: value['defaultValue'], label: value['label'], valid_for: value['validFor'], value: value['value'], ) end end |
#polymorphic_foreign_key? ⇒ Boolean
473 474 475 |
# File 'lib/yamori/schema.rb', line 473 def polymorphic_foreign_key? field["polymorphicForeignKey"] end |
#precision ⇒ Object
477 478 479 |
# File 'lib/yamori/schema.rb', line 477 def precision field["precision"] end |
#query_by_distance? ⇒ Boolean
481 482 483 |
# File 'lib/yamori/schema.rb', line 481 def query_by_distance? field["queryByDistance"] end |
#reference_target_field ⇒ Object
485 486 487 |
# File 'lib/yamori/schema.rb', line 485 def reference_target_field field["referenceTargetField"] end |
#reference_to ⇒ Object
489 490 491 |
# File 'lib/yamori/schema.rb', line 489 def reference_to field["referenceTo"] end |
#relationship_name ⇒ Object
493 494 495 |
# File 'lib/yamori/schema.rb', line 493 def relationship_name field["relationshipName"] end |
#relationship_order ⇒ Object
497 498 499 |
# File 'lib/yamori/schema.rb', line 497 def relationship_order field["relationshipOrder"] end |
#restricted_delete ⇒ Object
501 502 503 |
# File 'lib/yamori/schema.rb', line 501 def restricted_delete field["restrictedDelete"] end |
#restricted_picklist? ⇒ Boolean
505 506 507 |
# File 'lib/yamori/schema.rb', line 505 def restricted_picklist? field["restrictedPicklist"] end |
#scale ⇒ Object
509 510 511 |
# File 'lib/yamori/schema.rb', line 509 def scale field["scale"] end |
#search_prefilterable? ⇒ Boolean
513 514 515 |
# File 'lib/yamori/schema.rb', line 513 def search_prefilterable? field["searchPrefilterable"] end |
#soapType ⇒ Object
517 518 519 |
# File 'lib/yamori/schema.rb', line 517 def soapType field["soapType"] end |
#sortable? ⇒ Boolean
521 522 523 |
# File 'lib/yamori/schema.rb', line 521 def sortable? field["sortable"] end |
#to_h ⇒ Object
541 542 543 |
# File 'lib/yamori/schema.rb', line 541 def to_h field end |
#type ⇒ Object
525 526 527 |
# File 'lib/yamori/schema.rb', line 525 def type field["type"] end |
#unique? ⇒ Boolean
529 530 531 |
# File 'lib/yamori/schema.rb', line 529 def unique? field["unique"] end |
#updateable? ⇒ Boolean
533 534 535 |
# File 'lib/yamori/schema.rb', line 533 def updateable? field["updateable"] end |
#write_Requires_Master_Read? ⇒ Boolean
537 538 539 |
# File 'lib/yamori/schema.rb', line 537 def write_Requires_Master_Read? field["writeRequiresMasterRead"] end |