Is there a corresponding api to get "lastSequenceNumber"

How can I get lastSequenceNumber (which I can access from database using 1.x)?
Or is there any easy way to know if the database is modified since opening?

You could use lastSequenceNumber
From docs

Gets the latest sequence number used by the Database. Every new Revision is assigned a new sequence number, so this property increases monotonically as changes are made to the Database. This can be used to check whether the Database has changed between two points in time.

Which platform are you on ?

You could also register for Database Change Notifications (ChangeEvent) to be notified anytime the database is modified

Look for details here

Sorry, I should have been more definite.
Currently I’m trying to use CBL 2.0, it seems like the CBL 2.0 doesn’t have lastSequenceNumber api.

You can query for MAX(.sequenceNumber). I think this will be pretty efficient since there is an internal index of sequence numbers.

Something like this I suppose ? (in swift)

let searchQuery = QueryBuilder
        .select(SelectResult.expression(Function.max( Meta.sequence)))
    .from(DataSource.database(db))

Exactly, thanks. (I’m not good at the query API.)

Thank you for the information.