pub fn currval<S>(seq: &Singleton<'_, S, u64>) -> Result<u64, StdError> where S: Storage,
currval returns the last value returned by nextval. If the sequence has never been used, then it will return 0.