Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit b1d414b

Browse files
committed
Add Describe test for MySql
1 parent e32be9f commit b1d414b

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed

lib/ServiceStack.Text.dll

512 Bytes
Binary file not shown.

lib/ServiceStack.Text.pdb

0 Bytes
Binary file not shown.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using NUnit.Framework;
2+
using ServiceStack.DataAnnotations;
3+
using ServiceStack.Text;
4+
5+
namespace ServiceStack.OrmLite.MySql.Tests
6+
{
7+
public class Describe
8+
{
9+
[Alias("Field")]
10+
public string Name { get; set; }
11+
public string Type { get; set; }
12+
public string Null { get; set; }
13+
public string Key { get; set; }
14+
public string Default { get; set; }
15+
public string Extra { get; set; }
16+
}
17+
18+
[TestFixture]
19+
public class MySqlAdminTests : OrmLiteTestBase
20+
{
21+
[Test]
22+
public void Can_describe_a_table()
23+
{
24+
using (var db = OpenDbConnection())
25+
{
26+
db.DropAndCreateTable<Author>();
27+
28+
var info = db.SqlList<Describe>("DESCRIBE author");
29+
30+
info.PrintDump();
31+
}
32+
}
33+
}
34+
}

src/ServiceStack.OrmLite.MySql.Tests/ServiceStack.OrmLite.MySql.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
<Compile Include="ForeignKeyAttributeTests.cs" />
9696
<Compile Include="Issues\SelectExpressionIssues.cs" />
9797
<Compile Include="LocalizationTests.cs" />
98+
<Compile Include="MySqlAdminTests.cs" />
9899
<Compile Include="StringColumnTests.cs" />
99100
<Compile Include="NorthwindPerfTests.cs" />
100101
<Compile Include="OrmLiteBasicPersistenceProviderTests.cs" />

0 commit comments

Comments
 (0)