You are not logged in.
Pages: 1
What would the best way to test for an empty table, without throwing an exception?
Offline
What do you call "empty"?
You have the TSQLRest.TableRowCount(aClass) method to retrieve the row count.
Then the low-level TSQLDataBase.GetTableNames method to retrieve the list of existing tables. If your table is not in the list, the the table does not exist yet.
See TSQLRestServerDB.CreateMissingTables about how to use this method.
But in our ORM you should not have to use such low-level trick, but uses the TSQLModel.GetTableIndex() method to check that a table is in the current database model.
Offline
Pages: 1