This commit makes it possible to use DB's query functionality without needing to load the schema information. This helps a lot for databases with a large number of tables that you might interact with, but you also create reusable queries for. If you want to have a one time call to a query, the delay causes by loading the schema dwarfs the time it takes to retrieve the data.
This works by adding table as a property of the DB class. Any time table is called, it checks the private _table property's length. If the length is equal to 0, only then will it call the method to refresh the schema. Otherwise, it just returns _table once it is loaded. This approach limits the affect on the rest of the code.
This commit makes it possible to use DB's query functionality without needing to load the schema information. This helps a lot for databases with a large number of tables that you might interact with, but you also create reusable queries for. If you want to have a one time call to a query, the delay causes by loading the schema dwarfs the time it takes to retrieve the data.
This works by adding table as a property of the DB class. Any time table is called, it checks the private _table property's length. If the length is equal to 0, only then will it call the method to refresh the schema. Otherwise, it just returns _table once it is loaded. This approach limits the affect on the rest of the code.