public override DbTypeBase ToGenericType() { DbTypeDatetime res = new DbTypeDatetime(); res.SetSpecificAttribute("mssql", "subtype", "timestamp"); return(res); }
public override DbTypeBase ToGenericType() { var res = new DbTypeDatetime(); res.SubType = DbDatetimeSubType.Datetime; return(res); }
public override DbTypeBase ToGenericType() { DbTypeDatetime res = new DbTypeDatetime(); res.HasTimeZone = true; return(res); }
private MySqlTypeBase GetMySqlTypeDatetime(DbTypeDatetime type, IMySqlMigrationProfile profile, IProgressInfo progress) { switch (((DbTypeDatetime)type).SubType) { case DbDatetimeSubType.Date: return(new MySqlTypeDate()); case DbDatetimeSubType.Time: return(new MySqlTypeTime()); case DbDatetimeSubType.Datetime: { if (type.GetSpecificAttribute("mysql", "subtype") == "timestamp") { return(new MySqlTypeTimestamp()); } if (type.GetSpecificAttribute("mysql", "subtype") == "datetime") { return(new MySqlTypeDatetime()); } if (profile != null) { switch (profile.DateTimeAffinity) { case MySqlDateTimeAffinity.DateTime: return(new MySqlTypeDatetime()); case MySqlDateTimeAffinity.Timespamp: return(new MySqlTypeTimestamp()); } } return(new MySqlTypeTimestamp()); } case DbDatetimeSubType.Year: return(new MySqlTypeYear()); } return(new MySqlTypeDatetime()); }
private ISpecificType GetPostgreSqlTypeDatetime(DbTypeDatetime type) { if (type.SubType == DbDatetimeSubType.Interval) { return(new PostgreSqlTypeInterval()); } if (type.SubType == DbDatetimeSubType.Time) { if (type.HasTimeZone) { return(new PostgreSqlTypeTimeTz()); } return(new PostgreSqlTypeTime()); } if (type.SubType == DbDatetimeSubType.Datetime) { if (type.HasTimeZone) { return(new PostgreSqlTypeTimestampTz()); } return(new PostgreSqlTypeTimestamp()); } if (type.SubType == DbDatetimeSubType.Date) { return(new PostgreSqlTypeDate()); } return(new PostgreSqlTypeTimestamp()); }
protected override DbTypeBase ToGenericTypeNoArray() { DbTypeDatetime res = new DbTypeDatetime(); res.SubType = DbDatetimeSubType.Interval; return(res); }
public override DbTypeBase ToGenericType() { DbTypeDatetime res = new DbTypeDatetime(); res.SubType = DbDatetimeSubType.Datetime; res.SetSpecificAttribute("effiproz", "subtype", "date"); return(res); }
protected override DbTypeBase ToGenericTypeNoArray() { DbTypeDatetime res = new DbTypeDatetime(); res.SubType = DbDatetimeSubType.Datetime; res.HasTimeZone = true; return(res); }
//int m_precision = 3; //[DatAdmin.DisplayName("s_precision")] //public int Precision //{ // get { return m_precision; } // set { m_precision = value; } //} public override DbTypeBase ToGenericType() { DbTypeDatetime res = new DbTypeDatetime(); res.SubType = DbDatetimeSubType.Interval; res.SetSpecificAttribute("effiproz", "subtype", SubType); //res.SetSpecificAttribute("effiproz", "precision", Precision.ToString()); return(res); }
ITableStructure GetStructure(DbfFile dbf) { var res = new TableStructure(); //output column names for (int i = 0; i < dbf.Header.ColumnCount; i++) { DbTypeBase type; // convert DBF type to DA type switch (dbf.Header[i].ColumnType) { case DbfColumn.DbfColumnType.Binary: type = new DbTypeBlob(); break; case DbfColumn.DbfColumnType.Boolean: type = new DbTypeLogical(); break; case DbfColumn.DbfColumnType.Date: type = new DbTypeDatetime { SubType = DbDatetimeSubType.Date }; break; case DbfColumn.DbfColumnType.Character: type = new DbTypeString { Length = dbf.Header[i].Length }; break; case DbfColumn.DbfColumnType.Integer: type = new DbTypeInt(); break; case DbfColumn.DbfColumnType.Memo: type = new DbTypeText(); break; case DbfColumn.DbfColumnType.Number: type = new DbTypeNumeric { Precision = dbf.Header[i].DecimalCount }; break; default: type = new DbTypeString(); break; } res.AddColumn(dbf.Header[i].Name, type); } return(res); }
public override DbTypeBase ToGenericType() { var res = new DbTypeDatetime(); res.SubType = DbDatetimeSubType.Interval; res.SetSpecificAttribute("oracle", "subtype", "yeartomonth"); if (YearPrecision != null) { res.SetSpecificAttribute("oracle", "yearprecision", YearPrecision.ToString()); } return(res); }
public override DbTypeBase ToGenericType() { var res = new DbTypeDatetime(); res.SubType = DbDatetimeSubType.Datetime; res.HasTimeZone = TimeZone != TimeZoneType.None; res.SetSpecificAttribute("oracle", "subtype", "timestamp"); res.SetSpecificAttribute("oracle", "timezone", TimeZone.ToString().ToLower()); if (FractionalPrecision != null) { res.SetSpecificAttribute("oracle", "fractionalprecision", FractionalPrecision.ToString()); } return(res); }
public override DbTypeBase ToGenericType() { var res = new DbTypeDatetime(); res.SubType = DbDatetimeSubType.Interval; res.SetSpecificAttribute("oracle", "subtype", "daytosecond"); if (DayPrecision != null) { res.SetSpecificAttribute("oracle", "dayprecision", DayPrecision.ToString()); } if (FractionalPrecision != null) { res.SetSpecificAttribute("oracle", "fractionalprecision", FractionalPrecision.ToString()); } return(res); }
public override DbTypeBase ToGenericType() { DbTypeDatetime res = new DbTypeDatetime(); return(res); }