Struct oracle::StatementBuilder [−][src]
pub struct StatementBuilder<'conn, 'sql> { /* fields omitted */ }Expand description
A builder to create a Statement with various configuration
Implementations
Changes the array size used for performing fetches.
This specifies the number of rows allocated before performing fetches. The default value is 100. Higher value reduces the number of network round trips to fetch rows but requires more memory. The preferable value depends on the query and the environment.
If the query returns only onw row, it is better to change size to one.
let mut stmt = conn .statement("select StringCol from TestStrings where IntCol = :1") .fetch_array_size(1) .build()?; assert_eq!(stmt.query_row_as::<String>(&[&1])?, "String 1"); assert_eq!(stmt.query_row_as::<String>(&[&2])?, "String 2");
The number of rows that will be prefetched by the Oracle Client library when a query is executed. The default value is DPI_DEFAULT_PREFETCH_ROWS (2). Increasing this value may reduce the number of round-trips to the database that are required in order to fetch rows, but at the cost of increasing memory requirements. Setting this value to 0 will disable prefetch completely, which may be useful when the timing for fetching rows must be controlled by the caller.