neo4j / neo4j-go-driver

Neo4j Bolt Driver for Go
Apache License 2.0
482 stars 68 forks source link

Add `ExecuteQueryWithTransactionConfig` option for `ExecuteQuery` #553

Closed StephenCathcart closed 7 months ago

StephenCathcart commented 7 months ago

A new ExecuteQueryConfigurationOption has been added (ExecuteQueryWithTransactionConfig) to specify transaction config like metadata and transaction timeout with ExecuteQuery.

result, err := neo4j.ExecuteQuery(ctx, driver, query, parameters, transformer,
        neo4j.ExecuteQueryWithTransactionConfig(
                neo4j.WithTxTimeout(30*time.Second),
                neo4j.WithTxMetadata(map[string]any{"key": "value"}),
        ),
)
StephenCathcart commented 7 months ago

[go] Add Transaction Config to Driver.executeQuery