mysql-native v1.2.0

API Reference Home: [This Version] [Latest Version] [Other Versions]


Function PreparedImpl.setArg

Prepared statement parameter setter.

void setArg(T) (
  size_t index,
  T val,
  ParameterSpecialization psn = PSN(0, SQLType.INFER_FROM_D_TYPE, 0, null)
)
if (!isInstanceOf!(Nullable, T));

void setArg(T) (
  size_t index,
  Nullable!T val,
  ParameterSpecialization psn = PSN(0, SQLType.INFER_FROM_D_TYPE, 0, null)
);

The value may, but doesn't have to be, wrapped in a Variant. If so, null is handled correctly.

The value may, but doesn't have to be, a pointer to the desired value.

The value may, but doesn't have to be, wrapped in a Nullable!T. If so, null is handled correctly.

The value can be null.

Type Mappings

See the MySQL/D Type Mappings tables

Parameters

NameDescription
index The zero based index