mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-19 08:39:44 +00:00
@@ -55,7 +55,7 @@ impl SqliteArguments<'_> {
|
||||
let mut arg_i = 0;
|
||||
for handle in &statement.handles {
|
||||
let cnt = handle.bind_parameter_count();
|
||||
for param_i in 0..cnt {
|
||||
for param_i in 1..=cnt {
|
||||
// figure out the index of this bind parameter into our argument tuple
|
||||
let n: usize = if let Some(name) = handle.bind_parameter_name(param_i) {
|
||||
if name.starts_with('?') {
|
||||
@@ -77,7 +77,7 @@ impl SqliteArguments<'_> {
|
||||
));
|
||||
}
|
||||
|
||||
self.values[n - 1].bind(handle, param_i + 1)?;
|
||||
self.values[n - 1].bind(handle, param_i)?;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -142,6 +142,7 @@ impl StatementHandle {
|
||||
}
|
||||
|
||||
// Name Of A Host Parameter
|
||||
// NOTE: The first host parameter has an index of 1, not 0.
|
||||
#[inline]
|
||||
pub(crate) fn bind_parameter_name(&self, index: usize) -> Option<&str> {
|
||||
unsafe {
|
||||
|
||||
Reference in New Issue
Block a user