exists()

Tests if a database exists.

Signature

exists(): Boolean

Description

The exists() method tests if a database exists.

Parameters

None

Return value

Type Description

Boolean

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

Examples

Database.byName("childDB").exists()
true
Database.byName("noChildDB").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!