pandemonium_engine/modules/database/doc_classes/DatabaseManager.xml

111 lines
3.3 KiB
XML
Raw Normal View History

2022-08-21 00:40:49 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2024-04-26 17:32:25 +02:00
<class name="DatabaseManager" inherits="Object" version="4.4">
2022-08-21 00:40:49 +02:00
<brief_description>
Database Manager Singleton.
2022-08-21 00:40:49 +02:00
</brief_description>
<description>
Database Manager Singleton.
Stores database connections that need to be accessible throughout the application.
2022-08-21 00:40:49 +02:00
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_database">
<return type="void" />
<argument index="0" name="db" type="Database" />
<argument index="1" name="set_as_default" type="bool" default="true" />
<description>
Add a Database. If [code]set_as_default[/code] is true it will be set as default, which means it will be set to the [member ddb] property.
2022-08-21 00:40:49 +02:00
</description>
</method>
<method name="get_database">
<return type="Database" />
<argument index="0" name="index" type="int" />
<description>
Returns a Database.
2022-08-21 00:40:49 +02:00
</description>
</method>
<method name="get_database_count">
<return type="int" />
<description>
Returns how many databases are stored in the singleton.
2022-08-21 00:40:49 +02:00
</description>
</method>
<method name="get_databases">
<return type="Array" />
<description>
Returns all Databases.
2022-08-21 00:40:49 +02:00
</description>
</method>
2022-12-27 14:52:04 +01:00
<method name="initialized">
<return type="void" />
<description>
Calls the [code]initialized[/code] signal.
2022-12-27 14:52:04 +01:00
</description>
</method>
2022-08-21 00:40:49 +02:00
<method name="load">
<return type="void" />
<description>
Not implemented currently. Will likely load databases from ProjectSettings.
2022-08-21 00:40:49 +02:00
</description>
</method>
<method name="migrate">
<return type="void" />
<argument index="0" name="clear" type="bool" />
<argument index="1" name="should_seed" type="bool" />
<argument index="2" name="pseed" type="int" />
<description>
Calls the [member migration] signal.
2022-08-21 00:40:49 +02:00
</description>
</method>
<method name="remove_database">
<return type="void" />
<argument index="0" name="index" type="int" />
<argument index="1" name="unset_if_default" type="bool" default="true" />
<description>
Removes a Database.
2022-08-21 00:40:49 +02:00
</description>
</method>
</methods>
<members>
<member name="ddb" type="Database" setter="set_ddb" getter="get_ddb">
The default database.
2022-08-21 00:40:49 +02:00
</member>
</members>
<signals>
<signal name="database_added">
<argument index="0" name="db" type="Database" />
<description>
Emitted when a [Database] is added.
2022-08-21 00:40:49 +02:00
</description>
</signal>
<signal name="database_removed">
<argument index="0" name="db" type="Database" />
<description>
Emitted when a [Database] is removed.
2022-08-21 00:40:49 +02:00
</description>
</signal>
<signal name="default_database_changed">
<argument index="0" name="db" type="Database" />
<description>
Emitted when default database is changed.
2022-08-21 00:40:49 +02:00
</description>
</signal>
2022-12-27 14:52:04 +01:00
<signal name="initialized">
<description>
Can be emitted using the [member initialized] method after the database connections are set up.
2022-12-27 14:52:04 +01:00
</description>
</signal>
2022-08-21 00:40:49 +02:00
<signal name="migration">
<argument index="0" name="clear" type="bool" />
<argument index="1" name="should_seed" type="bool" />
<argument index="2" name="pseed" type="int" />
<description>
Can be emitted using the [member migrate] method when the databse structure needs to be updated (or created).
2022-08-21 00:40:49 +02:00
</description>
</signal>
</signals>
<constants>
</constants>
</class>