disable all schemas browsing when default schema is specified
160114
def table_exists?(name)
      return false unless name
      schema ? @connection.table_exists?(name, schema) : @connection.table_exists?(name)
    end
96176
def set_schema(self, schema_name, include_public=True):
        
        self.tenant = FakeTenant(schema_name=schema_name)
        self.schema_name = schema_name
        self.include_public_schema = include_public
        self.set_settings_schema(schema_name)
        self.search_path_set = False
        # Content type can no longer be cached as public and tenant schemas
        # have different models. If someone wants to change this, the cache
        # needs to be separated between public and shared schemas. If this
        # cache isn't cleared, this can cause permission problems. For example,
        # on public, a particular model has id 14, but on the tenants it has
        # the id 15. if 14 is cached instead of 15, the permissions for the
        # wrong model will be fetched.
        ContentType.objects.clear_cache()
1198446
public static void disableAutoCreationRemoteDatabase() {
        System.clearProperty(REMOTE_USER);
        System.clearProperty(REMOTE_PASSWORD);
        System.clearProperty(REMOTE_TYPE);
    }
774890
def disable(self):
        
        log = logging.getLogger('ipsv.models.sites.site')
        sites_enabled_path = _cfg.get('Paths', 'NginxSitesEnabled')
        symlink_path = os.path.join(sites_enabled_path, '{domain}-{fn}.conf'.format(domain=self.domain.name,
                                                                                    fn=self.slug))
        log.debug('Symlink path: %s', symlink_path)
        if os.path.islink(symlink_path):
            log.info('Removing configuration symlink: %s', symlink_path)
            os.unlink(symlink_path)

        self.enabled = 0
        Session.commit()
477260
def disable_host_freshness_checks(self):
        
        if self.my_conf.check_host_freshness:
            self.my_conf.modified_attributes |= \
                DICT_MODATTR["MODATTR_FRESHNESS_CHECKS_ENABLED"].value
            self.my_conf.check_host_freshness = False
            self.my_conf.explode_global_conf()
            self.daemon.update_program_status()
561564
def generate_default_schema(output):
    """"""
    original_path = os.path.join(os.path.dirname(__file__),
                                 'data',
                                 'randomnames-schema.json')
    shutil.copyfile(original_path, output)
573
public static void setSchemaTypeInfo(Configuration conf, StructTypeInfo schemaTypeInfo) {
    if (schemaTypeInfo != null) {
      conf.set(SCHEMA_TYPE_INFO, schemaTypeInfo.getTypeName());
      LOG.debug("Set schema typeInfo on conf: {}", schemaTypeInfo);
    }
  }
290616
private static function unboolSchema($schema)
    {
        static $trueSchema;
        static $falseSchema;

        if (null === $trueSchema) {
            $trueSchema = new Schema();
            $trueSchema->__booleanSchema = true;
            $falseSchema = new Schema();
            $falseSchema->not = $trueSchema;
            $falseSchema->__booleanSchema = false;
        }

        if ($schema === true) {
            return $trueSchema;
        } elseif ($schema === false) {
            return $falseSchema;
        } else {
            return $schema;
        }
    }
213351
public void disableAllOverrides(int pathID, String clientUUID) {
        PreparedStatement statement = null;
        try (Connection sqlConnection = sqlService.getConnection()) {
            statement = sqlConnection.prepareStatement(
                "DELETE FROM " + Constants.DB_TABLE_ENABLED_OVERRIDE +
                    " WHERE " + Constants.ENABLED_OVERRIDES_PATH_ID + " = ? " +
                    " AND " + Constants.GENERIC_CLIENT_UUID + " = ? "
            );
            statement.setInt(1, pathID);
            statement.setString(2, clientUUID);
            statement.execute();
            statement.close();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }
    }
867224
private function setMissingDefaults()
    {
        if (!isset($this->data['contenttype_groups'])) {
            $this->data['contenttype_groups'] = array('Content');
        }

        if ($this->notSetOrEmpty($this->data, 'names')) {
            $this->data['names'] = array(
                $this->data['main_language_code'] => $this->identifierToReadable($this->data['identifier']),
            );
        }

        foreach (array('name_schema', 'url_alias_schema') as $schema) {
            if ($this->notSetOrEmpty($this->data, $schema)) {
                $this->data[$schema] = sprintf('<%s>', $this->data['fields'][key($this->data['fields'])]->data['identifier']);
            }
        }
    }
167967
def disable(name, **kwargs):
    '''
    
    '''
    cmd = '/usr/sbin/svcadm disable {0}'.format(name)
    return not __salt__['cmd.retcode'](cmd, python_shell=False)
510564
def _schema_options(p):
    

    p.add_argument(
        'resource', metavar='selector', nargs='?',
        default=None).completer = _schema_tab_completer
    p.add_argument(
        '--summary', action="store_true",
        help="Summarize counts of available resources, actions and filters")
    p.add_argument('--json', action="store_true", help=argparse.SUPPRESS)
    p.add_argument("-v", "--verbose", action="count", help="Verbose logging")
    p.add_argument("-q", "--quiet", action="count", help=argparse.SUPPRESS)
    p.add_argument("--debug", default=False, help=argparse.SUPPRESS)
46964
void removeFromIndex(SchemaStoreItem item) {
    schemaIndex.remove(item.getSchema().getLongID());
    item.setStream(null);
  }
190639
private void checkDefaults() {
        Utils.require(m_shards != null || m_shardsRange != null, "shards or range parameter is not set");
        Utils.require(m_shards == null || m_shardsRange == null, "shards and range parameters cannot be both set");
        
        Utils.require(m_xshards == null || m_xshardsRange == null, "xshards and xrange parameters cannot be both set");
        if(m_xshards == null && m_xshardsRange == null) {
        	m_xshards = m_shards;
        	m_xshardsRange = m_shardsRange;
        }
        
        if (m_query == null) m_query = "*";
        if(m_metrics == null) m_metrics = "COUNT(*)";
    }
477078
def deactivate():
    

    if hasattr(_mode, "current_state"):
        del _mode.current_state
    if hasattr(_mode, "schema"):
        del _mode.schema

    for k in connections:
        con = connections[k]
        if hasattr(con, 'reset_schema'):
            con.reset_schema()
569873
def validate_schema(sconf):
    

    # verify session_name
    if 'session_name' not in sconf:
        raise exc.ConfigError('config requires "session_name"')

    if 'windows' not in sconf:
        raise exc.ConfigError('config requires list of "windows"')

    for window in sconf['windows']:
        if 'window_name' not in window:
            raise exc.ConfigError('config window is missing "window_name"')

        if 'panes' not in window:
            raise exc.ConfigError(
                'config window %s requires list of panes' % window['window_name']
            )

    return True
127308
def dirty_or_db_setting_or_default(key)
      if @dirty_options.key?(key)
        @dirty_options[key]
      elsif Configuration.exists?(name: namespaced_key(key))
        db_setting(key)
      else
        @default_options[key]
      end
    end