Azavea.Open.DAO.SQL.SqlDaDdlLayer.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 virtual bool StoreRoomMissing(ClassMapping mapping)
        {
            int count = SqlConnectionUtilities.XSafeIntQuery(_connDesc,
                "SELECT COUNT(*) FROM information_schema.tables where table_name = '" +
                mapping.Table.ToLower() + "'", null);
            return count == 0;
        }