mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-25 12:12:51 +08:00

- 增加 FreeSql.Provider.Odbc,实现 Oracle/SqlServer/MySql 的 Odbc 访问提供; - 增加 FreeSqlBuilder.UseConnectionString 参数 providerType,可解决因包版本冲突时,可能无法反射获得 FreeSql.Provider 对应的类型,通常这个参数不需要设置; - 优化 MaxLength 特性,当指定为 -1 时 DbType 会分别映射类型 text/nvarchar(max)/nvarchar2(4000);
67 lines
1.4 KiB
C#
67 lines
1.4 KiB
C#
using FreeSql.DataAnnotations;
|
|
using System;
|
|
using Xunit;
|
|
|
|
namespace FreeSql.Tests.Odbc.Oracle
|
|
{
|
|
public class OracleAdoTest
|
|
{
|
|
[Fact]
|
|
public void Pool()
|
|
{
|
|
var t1 = g.oracle.Ado.MasterPool.StatisticsFullily;
|
|
}
|
|
|
|
[Fact]
|
|
public void SlavePools()
|
|
{
|
|
var t2 = g.oracle.Ado.SlavePools.Count;
|
|
}
|
|
|
|
[Fact]
|
|
public void ExecuteReader()
|
|
{
|
|
|
|
}
|
|
[Fact]
|
|
public void ExecuteArray()
|
|
{
|
|
|
|
}
|
|
[Fact]
|
|
public void ExecuteNonQuery()
|
|
{
|
|
|
|
}
|
|
[Fact]
|
|
public void ExecuteScalar()
|
|
{
|
|
|
|
}
|
|
|
|
[Fact]
|
|
public void Query()
|
|
{
|
|
|
|
var t3 = g.oracle.Ado.Query<xxx>("select * from \"TB_TOPIC\"");
|
|
|
|
var t4 = g.oracle.Ado.Query<(int, string, string)>("select * from \"TB_TOPIC\"");
|
|
|
|
var t5 = g.oracle.Ado.Query<dynamic>("select * from \"TB_TOPIC\"");
|
|
}
|
|
|
|
[Fact]
|
|
public void QueryMultipline()
|
|
{
|
|
//var t3 = g.oracle.Ado.Query<xxx, (int, string, string), dynamic>("select * from \"TB_TOPIC\"; select * from \"TB_TOPIC\"; select * from \"TB_TOPIC\"");
|
|
}
|
|
|
|
class xxx
|
|
{
|
|
public int Id { get; set; }
|
|
public string Path { get; set; }
|
|
public string Title2 { get; set; }
|
|
}
|
|
}
|
|
}
|