@plyaz/db 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs
CHANGED
|
@@ -2756,19 +2756,15 @@ var SupabaseAdapter = class {
|
|
|
2756
2756
|
* @private
|
|
2757
2757
|
* @param {string} name - Logical table name.
|
|
2758
2758
|
* @returns {string} Actual table name.
|
|
2759
|
-
* @throws {DatabaseError} If table is not registered.
|
|
2760
2759
|
* @description
|
|
2761
|
-
* Retrieves the actual table name
|
|
2762
|
-
* This
|
|
2763
|
-
* on valid, registered tables. If the table is not found, it throws a DatabaseError.
|
|
2760
|
+
* Retrieves the actual table name. If not registered, auto-registers it.
|
|
2761
|
+
* This enables seamless table operations without manual registration.
|
|
2764
2762
|
*/
|
|
2765
2763
|
getTableName(name) {
|
|
2766
|
-
|
|
2764
|
+
let tableName = this.tableMap.get(name);
|
|
2767
2765
|
if (!tableName) {
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
DATABASE_ERROR_CODES.TABLE_NOT_REGISTERED
|
|
2771
|
-
);
|
|
2766
|
+
this.registerTable(name);
|
|
2767
|
+
tableName = name;
|
|
2772
2768
|
}
|
|
2773
2769
|
return tableName;
|
|
2774
2770
|
}
|