Class: Appwrite::Models::DedicatedDatabaseExecution
- Inherits:
-
Object
- Object
- Appwrite::Models::DedicatedDatabaseExecution
- Defined in:
- lib/appwrite/models/dedicated_database_execution.rb
Instance Attribute Summary collapse
-
#bytes ⇒ Object
readonly
Returns the value of attribute bytes.
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#duration_ms ⇒ Object
readonly
Returns the value of attribute duration_ms.
-
#row_count ⇒ Object
readonly
Returns the value of attribute row_count.
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
-
#truncated ⇒ Object
readonly
Returns the value of attribute truncated.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(rows:, row_count:, columns:, duration_ms:, truncated:, bytes:) ⇒ DedicatedDatabaseExecution
constructor
A new instance of DedicatedDatabaseExecution.
- #to_map ⇒ Object
Constructor Details
#initialize(rows:, row_count:, columns:, duration_ms:, truncated:, bytes:) ⇒ DedicatedDatabaseExecution
Returns a new instance of DedicatedDatabaseExecution.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/appwrite/models/dedicated_database_execution.rb', line 13 def initialize( rows:, row_count:, columns:, duration_ms:, truncated:, bytes: ) @rows = rows @row_count = row_count @columns = columns @duration_ms = duration_ms @truncated = truncated @bytes = bytes end |
Instance Attribute Details
#bytes ⇒ Object (readonly)
Returns the value of attribute bytes.
11 12 13 |
# File 'lib/appwrite/models/dedicated_database_execution.rb', line 11 def bytes @bytes end |
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
8 9 10 |
# File 'lib/appwrite/models/dedicated_database_execution.rb', line 8 def columns @columns end |
#duration_ms ⇒ Object (readonly)
Returns the value of attribute duration_ms.
9 10 11 |
# File 'lib/appwrite/models/dedicated_database_execution.rb', line 9 def duration_ms @duration_ms end |
#row_count ⇒ Object (readonly)
Returns the value of attribute row_count.
7 8 9 |
# File 'lib/appwrite/models/dedicated_database_execution.rb', line 7 def row_count @row_count end |
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
6 7 8 |
# File 'lib/appwrite/models/dedicated_database_execution.rb', line 6 def rows @rows end |
#truncated ⇒ Object (readonly)
Returns the value of attribute truncated.
10 11 12 |
# File 'lib/appwrite/models/dedicated_database_execution.rb', line 10 def truncated @truncated end |
Class Method Details
.from(map:) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/appwrite/models/dedicated_database_execution.rb', line 29 def self.from(map:) map = { "rows" => [], "rowCount" => 0, "columns" => [], "durationMs" => 0, "truncated" => false, "bytes" => 0 }.merge(map) DedicatedDatabaseExecution.new( rows: map["rows"], row_count: map["rowCount"], columns: map["columns"].map { |it| DedicatedDatabaseExecutionColumn.from(map: it) }, duration_ms: map["durationMs"], truncated: map["truncated"], bytes: map["bytes"] ) end |
Instance Method Details
#to_map ⇒ Object
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/appwrite/models/dedicated_database_execution.rb', line 41 def to_map { "rows": @rows, "rowCount": @row_count, "columns": @columns.map { |it| it.to_map }, "durationMs": @duration_ms, "truncated": @truncated, "bytes": @bytes } end |