/// <summary> /// 构造函数,创建一个指定DBS的空System.Object实例的SQL语句生成实例。 /// </summary> /// <param name="supportedDbSystem">受CCL支持的DBS。</param> public SQLGenerator(ESupportedDbSystem supportedDbSystem) { _operatedObject = new object(); _sqlSentence = string.Empty; _supportedDbSystem = supportedDbSystem; _dateTimeConvertMode = EDateTimeConvertMode.ToString; }
/// <summary> /// 构造函数,创建一个指定操作对象SQL语句生成实例。 /// </summary> /// <param name="operatedObject">需要生成对应成员SQL语句的对象。</param> /// <param name="supportedDbSystem">受CCL支持的DBS。</param> /// <param name="dateTimeConvertMode">指定日期类型转换存储的模式。</param> /// <exception cref="NotSupportedTypeException">当参数operatedObject指定的对象不受支持时,则会抛出这个异常。</exception> public SQLGenerator(object operatedObject, ESupportedDbSystem supportedDbSystem, EDateTimeConvertMode dateTimeConvertMode) { if (operatedObject.GetType().FullName == @"Cabinink.DataTreatment.ORMapping.SQLGenerator") { throw new NotSupportedTypeException(); } _operatedObject = operatedObject; _sqlSentence = string.Empty; _supportedDbSystem = supportedDbSystem; _dateTimeConvertMode = dateTimeConvertMode; }
/// <summary> /// 构造函数,创建一个指定受CCL(Cabinink Common Library)支持的数据库系统类型映射的数据类型映射实例。 /// </summary> /// <param name="mappingObject">需要被映射的数据类型或者实例。</param> /// <param name="supportedDbSystem">CCL支持的数据库系统类型映射的数据库系统。</param> /// <exception cref="NotSupportedTypeException">当参数mappingObject的子类实例不支持时,则会抛出这个异常。</exception> public TypeMapping(object mappingObject, ESupportedDbSystem supportedDbSystem) { if (mappingObject.GetType().ToString() == @"TypeMapping" || mappingObject.GetType().ToString() == @"ObjectMemberGetter") { throw new NotSupportedTypeException(); } else { _beforeObject = mappingObject; _supportedDbSystem = supportedDbSystem; } }
/// <summary> /// 构造函数,创建一个指定受CCL(Cabinink Common Library)支持的数据库系统类型映射的空数据类型映射实例。 /// </summary> /// <param name="supportedDbSystem">CCL支持的数据库系统类型映射的数据库系统。</param> public TypeMapping(ESupportedDbSystem supportedDbSystem) { _beforeObject = null; _supportedDbSystem = supportedDbSystem; }
private ESupportedDbSystem _supportedDbSystem; //CCL支持的数据库系统。 /// <summary> /// 构造函数,创建一个SQLite数据库系统类型映射的空数据类型映射实例。 /// </summary> public TypeMapping() { _beforeObject = null; _supportedDbSystem = ESupportedDbSystem.SQLite; }