@@ -460,13 +460,13 @@ bind_parameter_count(VALUE self)
460460 return INT2NUM (sqlite3_bind_parameter_count (ctx -> st ));
461461}
462462
463- /** call-seq: stmt.params
463+ /** call-seq: stmt.named_params
464464 *
465- * Return the list of named alphanumeric parameters in the statement.
466- * This returns a list of strings.
465+ * Return the list of named parameters in the statement.
466+ * This returns a frozen array of strings (without the leading prefix character) .
467467 * The values of this list can be used to bind parameters
468- * to the statement using bind_param. Numeric and anonymous parameters
469- * are ignored .
468+ * to the statement using bind_param. Positional (?NNN) and anonymous (?)
469+ * parameters are excluded .
470470 *
471471 */
472472static VALUE
@@ -484,10 +484,9 @@ named_params(VALUE self)
484484 // The first host parameter has an index of 1, not 0.
485485 for (int i = 1 ; i <= param_count ; i ++ ) {
486486 const char * name = sqlite3_bind_parameter_name (ctx -> st , i );
487- // We ignore numbered parameters (starting with ?)
488- // And null values, since there can be gaps in the list
487+ // We ignore positional and anonymous parameters, and also null values, since there can be
488+ // gaps in the list.
489489 if (name && * name != '?' ) {
490- // We ignore numeric parameters
491490 VALUE param = interned_utf8_cstr (name + 1 );
492491 rb_ary_push (params , param );
493492 }
0 commit comments