프로젝트

일반

사용자정보

통계
| 개정판:

hytos / DTI_PID / ID2PSN / IAbstractDatabase.cs @ b2e32d43

이력 | 보기 | 이력해설 | 다운로드 (1.87 KB)

1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Web;
5
using System.Text;
6
using System.Data;
7
using System.Data.Common;
8

    
9
namespace ID2PSN
10
{
11
    public interface IAbstractDatabase : IDisposable
12
    {
13
        DbConnection Connection { get; }
14
        DbCommand GetSqlStringCommand(string sqlString);
15
        DbCommand GetSqlStringCommand(string sqlStringFormat, params object[] args);
16
        DbCommand GetStoredProcedureCommand(string storedProcName);
17

    
18
        DbParameter AddInParameter(DbCommand cmd, string paramName, DbType paramType, object value);
19
        DbParameter AddInParameter(DbCommand cmd, string paramName, DbType paramType, int size, object value);
20
        DbParameter AddOutParameter(DbCommand cmd, string paramName, DbType paramType, object value);
21
        DbParameter AddParameter(DbCommand cmd, string paramName,
22
                                            DbType paramType,
23
                                            ParameterDirection direction,
24
                                            object value);
25
        DbParameter AddParameter(DbCommand cmd, string paramName,
26
                                            DbType paramType,
27
                                            ParameterDirection direction,
28
                                            int size,
29
                                            object value);
30

    
31
        int ExecuteNonQuery(DbCommand cmd);
32
        int ExecuteNonQuery(string sSql);
33
        int ExecuteNonQuery(DbCommand cmd, DbTransaction txn);
34
        DbDataReader ExecuteReader(DbCommand cmd);
35
        DbDataReader ExecuteReader(DbCommand cmd, CommandBehavior behavior);
36
        DataSet ExecuteDataSet(DbCommand cmd, DbTransaction txn = null);
37

    
38
        DbTransaction BeginTransaction();
39

    
40
        List<string> GetTableNames();
41
        List<string> GetCommonTableNames();
42
        List<string> GetColumnNames(string TableName);
43
    }
44
}
클립보드 이미지 추가 (최대 크기: 500 MB)