Exemple #1
0
        public SQLDatabase(String Name, ISQLServer Server)
        {
            if (String.IsNullOrWhiteSpace(Name))
            {
                throw new ArgumentOutOfRangeException("Database Name Cannot Be Null or Whitespace.");
            }

            if (Server == null)
            {
                throw new ArgumentNullException("Server Cannot Be Null.");
            }

            this.Name   = Name;
            this.Server = Server;

            ConnectionCredentials = new SQLConnectionCredentials(Server, $"Database={Name}");
        }
Exemple #2
0
        public void Prepare(string connectionstring, string table, string columnKey, string columnValue)
        {
            ConnectionString = connectionstring;
            TableName        = table;
            ColumnKey        = columnKey;
            ColumnValue      = columnValue;

            Server = new SQLServer(connectionstring);

            if (Regex.IsMatch(TableName, @"^\[\w +\]\.") == false)
            {
                TableName = TableName.Trim('[', ']');
                TableName = $"[dbo].[{TableName}]";
            }

            if (Server == null)
            {
                Server = new SQLServer(ConnectionString);
            }

            Server.Prepare <TKey, TValue>(TableName, ColumnKey, ColumnValue);
        }
Exemple #3
0
        public void Load(string connectionstring, string table, string columnKey, string columnValue)
        {
            ConnectionString = connectionstring;
            TableName        = table;
            ColumnKey        = columnKey;
            ColumnValue      = columnValue;

            if (Regex.IsMatch(TableName, @"^\[\w +\]\.") == false)
            {
                TableName = TableName.Trim('[', ']');
                TableName = $"[dbo].[{TableName}]";
            }

            Inner = new Dictionary <TKey, TValue>();

            if (Server == null)
            {
                Server = new SQLServer(ConnectionString);
            }

            Server.Start <TKey, TValue>(TableName, ColumnKey, ColumnValue, (k, v) => Inner.Add(k, v));
        }
 public SqlQueue(ISQLServer server, SqlQueueParameters parameters)
 {
     Server     = server;
     Parameters = parameters;
 }
Exemple #5
0
 public SqlNoMemoryDictionary(ISQLServer server)
 {
     Server = server;
 }
 public SqlSet(ISQLServer server, SqlSetParameters parameters)
 {
     Server     = server;
     Parameters = parameters;
 }
Exemple #7
0
 public SqlDictionary(ISQLServer server)
 {
     Server = server;
 }
 public IEnumerable <ISQLDatabase> GetData(ISQLServer SQLServer)
 {
     throw new NotImplementedException( );
 }
 public IEnumerable <long> GetStudyIDs(ISQLServer Server)
 {
     return(null);
 }
 public IEnumerable <long> GetStudyIDs(ISQLServer Server, ECP4DepoplymentEnvironment Environment)
 {
     return(null);
 }
 public IEnumerable <ICP4Study> GetStudies(ISQLServer Server)
 {
     return(null);
 }
 public IEnumerable <ECP4DepoplymentEnvironment> GetEnvironments(ISQLServer Server)
 {
     return(null);
 }