Initial Commit

This commit is contained in:
2016-07-21 16:55:03 -04:00
commit b6d5ec4ece
64 changed files with 7870 additions and 0 deletions

58
Interfaces.cs Normal file
View File

@@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Sdaleo
{
/// <summary>
/// Expose the most basic connection string information for various DB Types
/// </summary>
public interface IConnectDb
{
// Validity & Type
DBSystem DBType { get; }
bool IsValid { get; }
// Connection Properties
string ConnectionString { get; }
string DataSource { get; }
string User { get; }
// Exposes Interfaces, if DB Type Supports it
bool SupportsDBMS { get; }
IamDBMS DBMS { get; }
bool SupportsTimeouts { get; }
IsupportTimeouts Timeouts { get; }
}
/// <summary>
/// Expose DBMS specific Instance and DB information
/// </summary>
public interface IamDBMS
{
// DBMS have instances
string Server { get; }
string Instance { get; }
// DBMS have multiple databases
string Database { get; }
bool IsDatabaseSet { get; }
bool IsDatabaseSetAndNonSystem { get; }
bool IsDatabaseSetAndNonDefault { get; }
IConnectDb WithDatabase(string strDatabaseName);
IConnectDb WithoutDatabase();
}
/// <summary>
/// Expose DB Timeout information
/// </summary>
public interface IsupportTimeouts
{
uint CommandTimeout { get; set; }
uint ConnectionTimeout { get; set; }
IConnectDb WithConnectionTimeout(uint nConnectionTimeout);
IConnectDb WithCommandTimeout(uint nCommandTimeout);
IConnectDb WithTimeouts(uint nConnectionTimeout, uint nCommandTimeout);
}
}