pgsql/mysql/sqlserver适配

This commit is contained in:
28810
2018-12-18 20:09:52 +08:00
commit 9b5e34032c
130 changed files with 12283 additions and 0 deletions

View File

@ -0,0 +1,11 @@
using FreeSql.DataAnnotations;
using System;
namespace FreeSql.Internal.Model {
class ColumnInfo {
public TableInfo Table { get; set; }
public string CsName { get; set; }
public Type CsType { get; set; }
public ColumnAttribute Attribute { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
namespace FreeSql.Internal.Model {
class ReadAnonymousTypeInfo {
public string CsName { get; set; }
public ConstructorInfo Consturctor { get; set; }
public ReadAnonymousTypeInfoConsturctorType ConsturctorType { get; set; }
public List<ReadAnonymousTypeInfo> Childs = new List<ReadAnonymousTypeInfo>();
}
enum ReadAnonymousTypeInfoConsturctorType { Arguments, Properties }
}

View File

@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace FreeSql.Internal.Model {
class SelectColumnInfo {
public ColumnInfo Column { get; set; }
public SelectTableInfo Table { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace FreeSql.Internal.Model {
class SelectTableInfo {
public TableInfo Table { get; set; }
public string Alias { get; set; }
public string On { get; set; }
public SelectTableInfoType Type { get; set; }
}
enum SelectTableInfoType { From, LeftJoin, InnerJoin, RightJoin }
}

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Reflection;
namespace FreeSql.Internal.Model {
class TableInfo {
public Type Type { get; set; }
public Dictionary<string, PropertyInfo> Properties { get; set; } = new Dictionary<string, PropertyInfo>(StringComparer.CurrentCultureIgnoreCase);
public Dictionary<string, ColumnInfo> Columns { get; set; } = new Dictionary<string, ColumnInfo>(StringComparer.CurrentCultureIgnoreCase);
public Dictionary<string, ColumnInfo> ColumnsByCs { get; set; } = new Dictionary<string, ColumnInfo>(StringComparer.CurrentCultureIgnoreCase);
public ColumnInfo[] Primarys { get; set; }
public string CsName { get; set; }
public string DbName { get; set; }
public string DbOldName { get; set; }
public string SelectFilter { get; set; }
public List<List<ColumnInfo>> Uniques { get; set; } = new List<List<ColumnInfo>>();
}
}