You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.0 KiB
39 lines
1.0 KiB
using Apewer;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
|
|
namespace Apewer.Source
|
|
{
|
|
|
|
/// <summary>数据库引擎访问接口。</summary>
|
|
public interface IDatabase : IDisposable
|
|
{
|
|
|
|
/// <summary>数据库当前在线,表示连接可用。</summary>
|
|
bool Online { get; }
|
|
|
|
/// <summary>连接数据库,若未连接则尝试连接,获取连接成功的状态。</summary>
|
|
bool Connect();
|
|
|
|
/// <summary>关闭连接。</summary>
|
|
void Close();
|
|
|
|
/// <summary>关闭连接,且重置连接信息。</summary>
|
|
new void Dispose();
|
|
|
|
/// <summary>查询。</summary>
|
|
IQuery Query(string statement);
|
|
|
|
/// <summary>查询。</summary>
|
|
IQuery Query(string statement, IEnumerable<IDataParameter> parameter);
|
|
|
|
/// <summary>执行。</summary>
|
|
IExecute Execute(string statement);
|
|
|
|
/// <summary>执行。</summary>
|
|
IExecute Execute(string statement, IEnumerable<IDataParameter> parameter);
|
|
|
|
}
|
|
|
|
}
|
|
|