code: func (ms *SQLMsgStore) GetSequenceFromTimestamp(timestamp int64) (uint64, error) {
  	ms.Lock()
  	defer ms.Unlock()
  	// No message ever stored
  	if ms.first == 0 {
  		return 0, nil
  	}
  	// All messages have expired
  	if ms.first > ms.last {
  		return ms.last + 1, nil
  	}
  	r := ms.sqlStore.preparedStmts[sqlGetSequenceFromTimestamp].QueryRow(ms.channelID, timestamp)
  	seq := uint64(0)
  	err := r.Scan(&seq)
  	if err == sql.ErrNoRows {
  		return ms.last + 1, nil
  	}
  	if err != nil {
  		return 0, sqlStmtError(sqlGetSequenceFromTimestamp, err)
  	}
  	return seq, nil
  }
docs: // GetSequenceFromTimestamp implements the MsgStore interface