protected function get_indexing_restrictions() {
        global $DB;

        // This includes completely empty configdata, and also three other values that are
        // equivalent to empty:
        // - A serialized completely empty object.
        // - A serialized object with one field called '0' (string not int) set to boolean false
        //   (this can happen after backup and restore, at least historically).
        // - A serialized null.
        $stupidobject = (object)[];
        $zero = '0';
        $stupidobject->{$zero} = false;
        return [$DB->sql_compare_text('bi.configdata') . " != ? AND " .
                $DB->sql_compare_text('bi.configdata') . " != ? AND " .
                $DB->sql_compare_text('bi.configdata') . " != ? AND " .
                $DB->sql_compare_text('bi.configdata') . " != ?",
                ['', base64_encode(serialize((object)[])), base64_encode(serialize($stupidobject)),
                base64_encode(serialize(null))]];
    }
protected function get_indexing_restrictions() {
        global $DB;

        // This includes completely empty configdata, and also three other values that are
        // equivalent to empty:
        // - A serialized completely empty object.
        // - A serialized object with one field called '0' (string not int) set to boolean false
        //   (this can happen after backup and restore, at least historically).
        // - A serialized null.
        $stupidobject = (object)[];
        $zero = '0';
        $stupidobject->{$zero} = false;
        return [$DB->sql_compare_text('bi.configdata') . " != ? AND " .
                $DB->sql_compare_text('bi.configdata') . " != ? AND " .
                $DB->sql_compare_text('bi.configdata') . " != ? AND " .
                $DB->sql_compare_text('bi.configdata') . " != ?",
                ['', base64_encode(serialize((object)[])), base64_encode(serialize($stupidobject)),
                base64_encode(serialize(null))]];
    }
protected function get_indexing_restrictions ( ) { global $ DB ; // This includes completely empty configdata, and also three other values that are // equivalent to empty: // - A serialized completely empty object. // - A serialized object with one field called '0' (string not int) set to boolean false //   (this can happen after backup and restore, at least historically). // - A serialized null. $ stupidobject = ( object ) [ ] ; $ zero = '0' ; $ stupidobject -> { $ zero } = false ; return [ $ DB -> sql_compare_text ( 'bi.configdata' ) . " != ? AND " . $ DB -> sql_compare_text ( 'bi.configdata' ) . " != ? AND " . $ DB -> sql_compare_text ( 'bi.configdata' ) . " != ? AND " . $ DB -> sql_compare_text ( 'bi.configdata' ) . " != ?" , [ '' , base64_encode ( serialize ( ( object ) [ ] ) ) , base64_encode ( serialize ( $ stupidobject ) ) , base64_encode ( serialize ( null ) ) ] ] ; }
Returns restrictions on which block_instances rows to return. By default, excludes rows
that have empty configdata.

If no restriction is required, you could return ['', []].

@return array 2-element array of SQL restriction and params for it
Returns restrictions on which block_instances rows to return . By default excludes rows that have empty configdata .