Ejemplo n.º 1
0
        public IQueryAdapter getQueryreactor()
        {
            ActiveConnections++;
            IDatabaseClient dbClient = null;
            lock (connections.SyncRoot)
            {
                if (connections.Count > 0)
                {
                    dbClient = (IDatabaseClient)connections.Dequeue();
                }
            }

            if (dbClient != null)
            {
                dbClient.connect();
                dbClient.prepare();
                return dbClient.getQueryReactor();
            }
            else
            {
                IDatabaseClient connection = new MySqlClient(this, 0);
                connection.connect();
                connection.prepare();
                return connection.getQueryReactor();
            }
        }
Ejemplo n.º 2
0
        public IQueryAdapter getQueryreactor()
        {
            ActiveConnections++;
            IDatabaseClient dbClient = null;

            lock (connections.SyncRoot)
            {
                if (connections.Count > 0)
                {
                    dbClient = (IDatabaseClient)connections.Dequeue();
                }
            }

            if (dbClient != null)
            {
                dbClient.connect();
                dbClient.prepare();
                return(dbClient.getQueryReactor());
            }
            else
            {
                IDatabaseClient connection = new MySqlClient(this, 0);
                connection.connect();
                connection.prepare();
                return(connection.getQueryReactor());
            }
        }
Ejemplo n.º 3
0
        private void addConnection(int id)
        {
            var item = new MySqlClient(this);

            item.connect();
            databaseClients.Add(item);
        }
Ejemplo n.º 4
0
		public IQueryAdapter getQueryreactor()
		{
			IDatabaseClient databaseClient = new MySqlClient(this);
			databaseClient.connect();
			databaseClient.prepare();
			return databaseClient.getQueryReactor();
		}
Ejemplo n.º 5
0
        private void addConnection(int id)
        {
            MySqlClient item = new MySqlClient(this, id);

            item.connect();
            this.databaseClients.Add(item);
        }
Ejemplo n.º 6
0
        public IQueryAdapter getQueryreactor()
        {
            IDatabaseClient databaseClient = new MySqlClient(this);

            databaseClient.connect();
            databaseClient.prepare();
            return(databaseClient.getQueryReactor());
        }
Ejemplo n.º 7
0
 internal TransactionQueryReactor(MySqlClient client) : base(client)
 {
     this.initTransaction();
 }
Ejemplo n.º 8
0
 internal NormalQueryReactor(MySqlClient client)
     : base(client)
 {
     base.command = client.getNewCommand();
 }
Ejemplo n.º 9
0
 internal QueryAdapter(MySqlClient client)
 {
     this.client = client;
 }
Ejemplo n.º 10
0
 private void addConnection(int id)
 {
     MySqlClient item = new MySqlClient(this, id);
     item.connect();
     this.databaseClients.Add(item);
 }
Ejemplo n.º 11
0
 internal QueryAdapter(MySqlClient client)
 {
     this.client = client;
     this.watch = new Stopwatch();
     this.isExecutingAsync = false;
 }
Ejemplo n.º 12
0
        public IQueryAdapter getQueryreactor()
        {
            IDatabaseClient dbClient = null;
            lock (connections.SyncRoot)
            {
                if (connections.Count > 0)
                {
                    dbClient = (IDatabaseClient)connections.Dequeue();
                }
            }

            if (dbClient != null)
            {
                dbClient.connect();  
                dbClient.prepare();
                return dbClient.getQueryReactor();
            }
            else
            {
                if (type == DatabaseType.MySQL)
                {
                    IDatabaseClient connection = new MySqlClient(this, 0);
                    connection.connect();
                    connection.prepare();
                    return connection.getQueryReactor();
                }
                else
                {
                    throw new Exception("MSSQL no longer supported");
                }
            }
        }