module Trino::Client::ModelVersions::V0_205::QueryInfo
Public Class Methods
decode(hash)
click to toggle source
# File lib/trino/client/model_versions/0.205.rb, line 1381 def decode(hash) unless hash.is_a?(Hash) raise TypeError, "Can't convert #{hash.class} to Hash" end obj = allocate obj.send(:initialize_struct, hash["queryId"], hash["session"] && SessionRepresentation.decode(hash["session"]), hash["state"] && hash["state"].downcase.to_sym, hash["memoryPool"], hash["scheduled"], hash["self"], hash["fieldNames"], hash["query"], hash["queryStats"] && QueryStats.decode(hash["queryStats"]), hash["setCatalog"], hash["setSchema"], hash["setSessionProperties"], hash["resetSessionProperties"], hash["addedPreparedStatements"], hash["deallocatedPreparedStatements"], hash["startedTransactionId"], hash["clearTransactionId"], hash["updateType"], hash["outputStage"] && StageInfo.decode(hash["outputStage"]), hash["failureInfo"] && FailureInfo.decode(hash["failureInfo"]), hash["errorCode"] && ErrorCode.decode(hash["errorCode"]), hash["inputs"] && hash["inputs"].map {|h| Input.decode(h) }, hash["output"] && Output.decode(hash["output"]), hash["completeInfo"], hash["resourceGroupName"], hash["finalQueryInfo"], ) obj end