PreparedStatementBind Method |
Creates a new BoundStatement instance with the provided parameter values.
You can specify the parameter values by the position of the markers in the query, or by name using a single instance of an anonymous type, with property names as parameter names.
Note that while no more values than bound variables can be provided, it is allowed to provide less values that there is variables.
You can provide a comma-separated variable number of arguments to the Bind() method. When providing an array, the reference might be used by the driver making it not safe to modify its content.
Namespace: Dse
public virtual BoundStatement Bind( params Object[] values )
PreparedStatement ps = session.Prepare("INSERT INTO table (id, name) VALUES (?, ?)"); BoundStatement statement = ps.Bind(Guid.NewGuid(), "Franz Ferdinand"); session.Execute(statement);