exists()

Test if a database exists.

Signature

exists(): Boolean

Description

The exists() method tests if the database instance exists.

Parameters

None

Return value

Type Description

Boolean

true = database exists
false = database doesn’t exist.

Examples

Database.byName("DemoChildDB").exists()
true

Database.byName("ChildDB").exists()
false

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!