-{"metadata":{"roleHeading":"Instance Method","externalID":"s:4Kuzu10ConnectionC7executeyAA11QueryResultCAA17PreparedStatementC_SDySSxSgGtKlF","title":"execute(_:_:)","modules":[{"name":"Kuzu"}],"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"execute","kind":"identifier"},{"text":"<","kind":"text"},{"text":"T","kind":"genericParameter"},{"text":">(","kind":"text"},{"text":"PreparedStatement","preciseIdentifier":"s:4Kuzu17PreparedStatementC","kind":"typeIdentifier"},{"text":", [","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":" : ","kind":"text"},{"text":"T","kind":"typeIdentifier"},{"text":"?]) ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"QueryResult","preciseIdentifier":"s:4Kuzu11QueryResultC","kind":"typeIdentifier"}],"symbolKind":"method"},"abstract":[{"text":"Executes the specified prepared statement with the given parameters and returns the result.","type":"text"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"execute"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"preparedStatement"},{"kind":"text","text":": "},{"identifier":"doc:\/\/Kuzu\/documentation\/Kuzu\/PreparedStatement","kind":"typeIdentifier","preciseIdentifier":"s:4Kuzu17PreparedStatementC","text":"PreparedStatement"},{"kind":"text","text":", "},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"parameters"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?]) "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"identifier":"doc:\/\/Kuzu\/documentation\/Kuzu\/QueryResult","kind":"typeIdentifier","preciseIdentifier":"s:4Kuzu11QueryResultC","text":"QueryResult"}]}]},{"kind":"parameters","parameters":[{"content":[{"inlineContent":[{"text":"The prepared statement to execute","type":"text"}],"type":"paragraph"}],"name":"preparedStatement"},{"name":"parameters","content":[{"inlineContent":[{"type":"text","text":"A dictionary mapping parameter names to their values"}],"type":"paragraph"}]}]},{"content":[{"anchor":"return-value","level":2,"text":"Return Value","type":"heading"},{"inlineContent":[{"text":"A QueryResult containing the results of the query","type":"text"}],"type":"paragraph"}],"kind":"content"},{"content":[{"anchor":"discussion","type":"heading","text":"Discussion","level":2},{"content":[{"inlineContent":[{"text":"KuzuError if query execution fails","type":"text"}],"type":"paragraph"}],"type":"aside","style":"note","name":"Throws"}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/kuzu\/connection\/execute(_:_:)"]}],"kind":"symbol","identifier":{"url":"doc:\/\/Kuzu\/documentation\/Kuzu\/Connection\/execute(_:_:)","interfaceLanguage":"swift"},"sections":[],"schemaVersion":{"minor":3,"patch":0,"major":0},"hierarchy":{"paths":[["doc:\/\/Kuzu\/documentation\/Kuzu","doc:\/\/Kuzu\/documentation\/Kuzu\/Connection"]]},"references":{"doc://Kuzu/documentation/Kuzu/PreparedStatement":{"type":"topic","url":"\/documentation\/kuzu\/preparedstatement","title":"PreparedStatement","abstract":[{"type":"text","text":"A class representing a prepared statement in Kuzu."},{"type":"text","text":" "},{"type":"text","text":"PreparedStatement can be used to execute a query with parameters."},{"type":"text","text":" "},{"type":"text","text":"It is returned by the "},{"code":"prepare","type":"codeVoice"},{"type":"text","text":" method of Connection."}],"kind":"symbol","identifier":"doc:\/\/Kuzu\/documentation\/Kuzu\/PreparedStatement","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"PreparedStatement"}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"PreparedStatement"}]},"doc://Kuzu/documentation/Kuzu":{"type":"topic","title":"Kuzu","url":"\/documentation\/kuzu","role":"collection","kind":"symbol","identifier":"doc:\/\/Kuzu\/documentation\/Kuzu","abstract":[]},"doc://Kuzu/documentation/Kuzu/QueryResult":{"kind":"symbol","url":"\/documentation\/kuzu\/queryresult","navigatorTitle":[{"kind":"identifier","text":"QueryResult"}],"type":"topic","abstract":[{"text":"A class representing the result of a query, which can be used to iterate over the result set.","type":"text"},{"text":" ","type":"text"},{"text":"QueryResult is returned by the ","type":"text"},{"code":"query","type":"codeVoice"},{"text":" and ","type":"text"},{"code":"execute","type":"codeVoice"},{"text":" methods of Connection.","type":"text"},{"text":" ","type":"text"},{"text":"It conforms to ","type":"text"},{"code":"CustomStringConvertible","type":"codeVoice"},{"text":" and ","type":"text"},{"type":"codeVoice","code":"Sequence"},{"type":"text","text":" protocols for easy string representation and iteration."}],"role":"symbol","fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"QueryResult"}],"title":"QueryResult","identifier":"doc:\/\/Kuzu\/documentation\/Kuzu\/QueryResult"},"doc://Kuzu/documentation/Kuzu/Connection":{"kind":"symbol","url":"\/documentation\/kuzu\/connection","role":"symbol","title":"Connection","identifier":"doc:\/\/Kuzu\/documentation\/Kuzu\/Connection","navigatorTitle":[{"kind":"identifier","text":"Connection"}],"abstract":[{"type":"text","text":"Represents a connection to a Kuzu database."}],"fragments":[{"kind":"keyword","text":"class"},{"kind":"text","text":" "},{"kind":"identifier","text":"Connection"}],"type":"topic"},"doc://Kuzu/documentation/Kuzu/Connection/execute(_:_:)":{"url":"\/documentation\/kuzu\/connection\/execute(_:_:)","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"execute"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"T"},{"kind":"text","text":">("},{"kind":"typeIdentifier","preciseIdentifier":"s:4Kuzu17PreparedStatementC","text":"PreparedStatement"},{"kind":"text","text":", ["},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"T"},{"kind":"text","text":"?]) "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:4Kuzu11QueryResultC","text":"QueryResult"}],"identifier":"doc:\/\/Kuzu\/documentation\/Kuzu\/Connection\/execute(_:_:)","title":"execute(_:_:)","abstract":[{"text":"Executes the specified prepared statement with the given parameters and returns the result.","type":"text"}],"role":"symbol","type":"topic"}}}
0 commit comments