public override void Prepare() { if (AutoIncrement && Type.GetSimpleType() != SimpleTypes.Integer) { throw new Exception("Can not create autoincrement by not ineteger type column"); } }
public override void Prepare() { base.Prepare(); var simpleOut = ToType.GetSimpleType(); switch (simpleOut) { case SimpleTypes.Blob: GetBlobResultOut = data => { return(Operand.GetBlobResultOut(data)); }; break; case SimpleTypes.String: GetStrResultOut = data => { return(Operand.GetStrResultOut(data)); }; break; case SimpleTypes.Boolean: GetBoolResultOut = data => { return(Operand.GetBoolResultOut(data)); }; break; case SimpleTypes.Date: case SimpleTypes.DateTime: GetDateTimeResultOut = data => { return(Operand.GetDateTimeResultOut(data)); }; break; case SimpleTypes.Float: GetFloatResultOut = data => { return(Operand.GetFloatResultOut(data)); }; break; case SimpleTypes.Geometry: GetGeomResultOut = data => { return(Operand.GetGeomResultOut(data)); }; break; case SimpleTypes.Integer: GetIntResultOut = data => { return(Operand.GetIntResultOut(data)); }; break; case SimpleTypes.Time: GetTimeResultOut = data => { return(Operand.GetTimeResultOut(data)); }; break; default: throw new Exception("unsupported type"); } SetResultType(simpleOut); }