Azavea.Open.DAO.SQLite.SQLiteDaLayer.StoreRoomMissing C# (CSharp) Method

StoreRoomMissing() public method

Returns true if you need to call "CreateStoreRoom" before storing any data. This method is "Missing" not "Exists" because implementations that do not use a store room can return "false" from this method without breaking either a user's app or the spirit of the method. Store room typically corresponds to "table".
public StoreRoomMissing ( ClassMapping mapping ) : bool
mapping ClassMapping
return bool
        public override bool StoreRoomMissing(ClassMapping mapping)
        {
            int count = SqlConnectionUtilities.XSafeIntQuery(_connDesc,
                "SELECT COUNT(*) FROM sqlite_master where type = 'table' and name = '" +
                mapping.Table + "'", null);
            return count == 0;
        }