- 增加 IsSyncStructureToUpper 参数,以便适应 Oracle 大小写使用习惯;
- FreeSql.Repository 增加 GuidRepository 类,适用 Insert 方法无须返回插入的数据;
- FreeSql.Repository 增加 IFreeSql 扩展方法 GetRepository、GetGuidRepository;
This commit is contained in:
28810
2019-02-28 17:31:04 +08:00
parent a3720bf81e
commit f034d4194d
23 changed files with 281 additions and 195 deletions

View File

@ -23,8 +23,8 @@ namespace FreeSql.Sqlite {
}
public bool IsAutoSyncStructure { get; set; } = true;
public bool IsQuoteSqlName { get; set; } = true;
public bool IsSyncStructureToLower { get; set; } = false;
public bool IsSyncStructureToUpper { get; set; } = false;
public bool IsLazyLoading { get; set; } = false;
static object _dicCsToDbLock = new object();

View File

@ -53,7 +53,7 @@ namespace FreeSql.Sqlite {
});
internal override string FormatSql(string sql, params object[] args) => sql?.FormatSqlite(args);
internal override string QuoteSqlName(string name) => _orm.CodeFirst.IsQuoteSqlName ? $"\"{name.Trim('"').Replace(".", "\".\"")}\"" : name;
internal override string QuoteSqlName(string name) => $"\"{name.Trim('"').Replace(".", "\".\"")}\"";
internal override string QuoteParamterName(string name) => $"@{(_orm.CodeFirst.IsSyncStructureToLower ? name.ToLower() : name)}";
internal override string IsNull(string sql, object value) => $"ifnull({sql}, {value})";
internal override string StringConcat(string left, string right, Type leftType, Type rightType) => $"{left} || {right}";