支持Oracle库、Oracle库代码生成完善

This commit is contained in:
不做码农
2023-06-10 18:26:18 +08:00
parent 9be0036b4e
commit 9f587711f0
23 changed files with 239 additions and 99 deletions

View File

@@ -2,6 +2,7 @@
using SqlSugar;
using System.Collections.Generic;
using System.Linq;
using ZR.CodeGenerator.Model;
using ZR.Model;
namespace ZR.CodeGenerator.Service
@@ -72,5 +73,18 @@ namespace ZR.CodeGenerator.Service
{
return GetSugarDbContext(dbName).DbMaintenance.GetColumnInfosByTableName(tableName, true);
}
/// <summary>
/// 获取Oracle所有序列
/// </summary>
/// <param name="dbName"></param>
/// <returns></returns>
public List<OracleSeq> GetAllOracleSeqs(string dbName)
{
string sql = "SELECT * FROM USER_SEQUENCES";
var seqs = GetSugarDbContext(dbName).Ado.SqlQuery<OracleSeq>(sql);
return seqs.ToList();
}
}
}