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