获取连接池里的一个数据库连接。若为有事务连接则直接返回事务连接，事务连接是线程安全的。

@return 返回一个数据库连接, 失败返回null
767936
public static Connection getConnection() {
        Connection connection = tl_conn.get();
        try {
            // 若tl.get()返回不是null说明当前线程有事务连接，直接返回事务连接
            if (connection != null) {
                return connection;
            }
            // 若为null则从连接池里返回一个连接
            connection = dataSource.getConnection();
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
        return connection;
    }
737706
final public function begin()
    {
        if (!$this->pdo) {
            throw  new Exception('您还没有连接数据库', Exception::CODE_DATABASE_ERROR);
        }
        if ($this->_begintransaction) {
            throw new Exception("已经开启了一个事务，请勿重新开启", Exception::CODE_DATABASE_ERROR);
        }
        $this->pdo->beginTransaction();
        $this->_begintransaction = true;
        return $this;
    }
918814
public byte[] getData() {
		// this.count不可能==0
		int classInfoLength = writeDependClasses();
		if (classInfoLength > 0) {
			byteArray.writeInt4(classInfoLength);
		}
		byte[] data = byteArray.toBytes();
		if (classInfoLength > 0) {
			data[this.offsetLength] = XsonConst.HEAD_1;
		}
		byteArray = null;
		return data;
	}
581246
public Observable<String> getLogs() {
        return aFile != null ? aFile.getLogs() : Observable.just(null);
    }
1083785
private void getNextEventIndex() {
        for (int i = next + 1; i < events.size(); i++) {
            String evName = getValueOr(events.get(i), "event", "");
            if (evName.equals(eventType)) {
                next = i;
                return;
            }
        }
        next = events.size();
    }
1340293
@Nullable
    public TransactionOutput getConnectedOutput() {
        if (fromTx != null) {
            return fromTx.getOutputs().get((int) index);
        } else if (connectedOutput != null) {
            return connectedOutput;
        }
        return null;
    }
520066
public Object getNextData()
    {
        try   {
            String strNext = m_daIn.readUTF();
            return strNext;
        } catch (IOException ex)    {
            ex.printStackTrace();
            return null;
        }
    }
38931
public Optional<E> getPrevious() {
        return Optional.of(currentIndex).filter(getGreater(0))
                .map(i -> linkedList.get(--currentIndex));
    }
40508
public T get() {
		final SQLiteDatabase db = Sprinkles.getDatabase();
		final Cursor c = db.rawQuery(rawQuery, null);

		T result = null;
		if (c.moveToFirst()) {
			result = Utils.getResultFromCursor(resultClass, c);
		}

		c.close();
		return result;
	}
128748
public String getNullValueSelect()
    {
        String ret = null;
        if (!this.types.isEmpty())  {
            ret = Context.getDbType().getNullValueSelect(this.types.iterator().next());
        }
        return ret;
    }
765012
@Override
    public Object next() {
        Object retVal = null;
        try {
            retVal = nextEvent();
        } catch (final XMLStreamException e) {
            retVal = null;
        }
        return retVal;
    }
299246
public <V> V getValue() {
        if (values == null || values.isEmpty()) {
            return null;
        }
        return (V)values.get(0);
    }
1188180
public function getNext()
    {
        if (false === $this->pointer || !$this->count || $this->count == $this->pointer) {
            return null;
        }
        
        $pointer = $this->pointer + 1;
        
        return isset($this->ids[$pointer]) ? $this->ids[$pointer] : null;
    }
1075365
protected String getToken() {
        return dataMgr.getSessionDAO().session() != null ? dataMgr.getSessionDAO().session().getAccessToken() : null;
    }
805002
public Integer getInstance() {
    try {
      return Integer.valueOf(uri.getPath().split("/")[2]);
    } catch (IndexOutOfBoundsException e) {
      return null;
    }
  }
360702
private boolean needInitSheet() {
        if (null == this.currentSheet) {
            //证明是第一页,肯定需要初始化
            return true;
        }
        //标识即将写入的下一行的行标
        int nextRowIndex = this.currentRowInSheet;
        if (!this.isBlankLastRow || (this.isBlankLastRow && !this.isSkipBlankRow)) {
            nextRowIndex++;
        }
        return nextRowIndex >= this.allowMaxRows;
    }
632921
@Override
	public ThriftConnection<T> pollConnection() {
		ThriftConnection<T> result;
		if (pool.getThriftServerCount() == 0) {
			throw new IllegalStateException("当前无可用连接服务器");
		}
		int partition = (int) (Thread.currentThread().getId() % this.pool.thriftServerCount);

		ThriftConnectionPartition<T> thriftConnectionPartition = this.pool.partitions.get(partition);

		result = thriftConnectionPartition.poolFreeConnection();
		if (result == null) {
			for (int i = 0; i < this.pool.thriftServerCount; i++) {
				if (i == partition) {
					continue;
				}
				result = this.pool.partitions.get(i).poolFreeConnection();
				if (result != null) {
					thriftConnectionPartition = this.pool.partitions.get(i);
					break;
				}
			}
		}

		if (!thriftConnectionPartition.isUnableToCreateMoreTransactions()) {
			this.pool.maybeSignalForMoreConnections(thriftConnectionPartition);
		}
		return result;
	}