public void AddInObject(NpgsqlCommand command, Sql.SchemaParameter parameter, object value) { var schemaParameter = (SchemaParameter)parameter; var sqlParameter = command.CreateParameter(); sqlParameter.NpgsqlDbType = schemaParameter.NpgsqlDbType; sqlParameter.ParameterName = parameter.Name; sqlParameter.Value = Normalize(value); command.Parameters.Add(sqlParameter); }
public override void AddInParameter(Sql.SchemaParameter parameter, object value) { var sqlParameter = this.command.Parameters.Contains(parameter.Name) ? this.command.Parameters[parameter.Name] : null; if (sqlParameter == null) { sqlParameter = this.command.CreateParameter(); sqlParameter.DbType = parameter.DbType; sqlParameter.ParameterName = parameter.Name; this.command.Parameters.Add(sqlParameter); } this.SetParameterValue(parameter.Name, value); }
public override void AddOutParameter(Sql.SchemaParameter parameter) { var sqlParameter = this.command.Parameters.Contains(parameter.Name) ? this.command.Parameters[parameter.Name] : null; if (sqlParameter == null) { sqlParameter = this.command.CreateParameter(); sqlParameter.ParameterName = parameter.Name; sqlParameter.DbType = parameter.DbType; sqlParameter.Direction = ParameterDirection.Output; this.command.Parameters.Add(sqlParameter); } this.command.Parameters.Add(sqlParameter); }
public void SetInObject(NpgsqlCommand command, Sql.SchemaParameter param, object value) { command.Parameters[param.Name].Value = Normalize(value); }
public override void SetParameterValue(Sql.SchemaParameter parameter, object value) { this.SetParameterValue(parameter.Name, value); }