mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
pgsql/mysql/sqlserver适配
This commit is contained in:
11
FreeSql/Internal/Model/ColumnInfo.cs
Normal file
11
FreeSql/Internal/Model/ColumnInfo.cs
Normal 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; }
|
||||
}
|
||||
}
|
14
FreeSql/Internal/Model/ReadAnonymousTypeInfo.cs
Normal file
14
FreeSql/Internal/Model/ReadAnonymousTypeInfo.cs
Normal 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 }
|
||||
}
|
10
FreeSql/Internal/Model/SelectColumnInfo.cs
Normal file
10
FreeSql/Internal/Model/SelectColumnInfo.cs
Normal 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; }
|
||||
}
|
||||
}
|
9
FreeSql/Internal/Model/SelectTableInfo.cs
Normal file
9
FreeSql/Internal/Model/SelectTableInfo.cs
Normal 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 }
|
||||
}
|
18
FreeSql/Internal/Model/TableInfo.cs
Normal file
18
FreeSql/Internal/Model/TableInfo.cs
Normal 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>>();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user