public function getSequence($asFloat=false,$unpredictable=false) {
		$sql="select next_{$this->tableSequence}({$this->nodeId}) id";
		$r=$this->runRawQuery($sql,null,true);
		if ($unpredictable) {
			if (PHP_INT_SIZE == 4) {
				return $this->encryption->encryptSimple($r[0]['id']);
			} else {
				// $r is always a 32 bit number so it will fail in PHP 32bits
				return $this->encryption->encryptInteger($r[0]['id']);
			}
		}
		if($asFloat)
			return floatval($r[0]['id']);
		else
			return $r[0]['id'];
	}
public function getSequence($asFloat=false,$unpredictable=false) {
		$sql="select next_{$this->tableSequence}({$this->nodeId}) id";
		$r=$this->runRawQuery($sql,null,true);
		if ($unpredictable) {
			if (PHP_INT_SIZE == 4) {
				return $this->encryption->encryptSimple($r[0]['id']);
			} else {
				// $r is always a 32 bit number so it will fail in PHP 32bits
				return $this->encryption->encryptInteger($r[0]['id']);
			}
		}
		if($asFloat)
			return floatval($r[0]['id']);
		else
			return $r[0]['id'];
	}
public function getSequence ( $ asFloat = false , $ unpredictable = false ) { $ sql = "select next_{$this->tableSequence}({$this->nodeId}) id" ; $ r = $ this -> runRawQuery ( $ sql , null , true ) ; if ( $ unpredictable ) { if ( PHP_INT_SIZE == 4 ) { return $ this -> encryption -> encryptSimple ( $ r [ 0 ] [ 'id' ] ) ; } else { // $r is always a 32 bit number so it will fail in PHP 32bits return $ this -> encryption -> encryptInteger ( $ r [ 0 ] [ 'id' ] ) ; } } if ( $ asFloat ) return floatval ( $ r [ 0 ] [ 'id' ] ) ; else return $ r [ 0 ] [ 'id' ] ; }
It returns the next sequence.
It gets a collision free number if we don't do more than one operation
every 0.0001 seconds.
But, if we do 2 or more operations per seconds then, it adds a sequence number from
0 to 4095
So, the limit of this function is 4096 operations per 0.0001 second.

@see \eftec\DaoOne::getSequencePHP It's the same but it uses less resources but lacks of a sequence.
@param bool $asFloat
@param bool $unpredictable
@return string . Example string(19) "3639032938181434317"
@throws Exception
It returns the next sequence . It gets a collision free number if we don t do more than one operation every 0 . 0001 seconds . But if we do 2 or more operations per seconds then it adds a sequence number from 0 to 4095 So the limit of this function is 4096 operations per 0 . 0001 second .