<commit_before>package org.basex.query.expr.index;

import org.basex.data.*;
import org.basex.query.*;
import org.basex.query.expr.*;
import org.basex.query.util.*;
import org.basex.query.var.*;
import org.basex.util.*;
import org.basex.util.hash.*;

/**
 * This class defines a static database source for index operations.
 *
 * @author BaseX Team 2005-20, BSD License
 * @author <NAME>
 */
public final class IndexStaticDb extends IndexDb {
  /** Data reference. */
  private final Data data;

  /**
   * Constructor.
   * @param data data reference
   * @param info input info
   */
  public IndexStaticDb(final Data data, final InputInfo info) {
    super(info);
    this.data = data;
  }

  @Override
  public void checkUp() {
  }

  @Override
  public Expr compile(final CompileContext cc) {
    return this;
  }

  @Override
  public boolean has(final Flag... flags) {
    return false;
  }

  @Override
  public boolean inlineable(final Var var) {
    return true;
  }

  @Override
  public VarUsage count(final Var var) {
    return VarUsage.NEVER;
  }

  @Override
  public IndexDb inline(final Var var, final Expr ex, final CompileContext cc) {
    return null;
  }

  @Override
  public boolean accept(final ASTVisitor visitor) {
    return true;
  }

  @Override
  public int exprSize() {
    return 1;
  }

  @Override
  public IndexDb copy(final CompileContext cc, final IntObjMap<Var> vm) {
    return new IndexStaticDb(data, info);
  }

  @Override
  public Data data() {
    return data;
  }

  @Override
  Data data(final QueryContext qc) {
    return data;
  }

  @Override
  public boolean equals(final Object obj) {
    return obj instanceof IndexStaticDb && data == ((IndexStaticDb) obj).data && super.equals(obj);
  }

  @Override
  public void plan(final QueryPlan plan) {
    plan.add(plan.create(this));
  }

  @Override
  public String toString() {
    return data.meta.name;
  }
}<commit_msg>[MIN] XQuery, full-text: info output (query plan, info)<commit_after>package org.basex.query.expr.index;

import org.basex.data.*;
import org.basex.query.*;
import org.basex.query.expr.*;
import org.basex.query.util.*;
import org.basex.query.value.item.*;
import org.basex.query.var.*;
import org.basex.util.*;
import org.basex.util.hash.*;

/**
 * This class defines a static database source for index operations.
 *
 * @author BaseX Team 2005-20, BSD License
 * @author <NAME>
 */
public final class IndexStaticDb extends IndexDb {
  /** Data reference. */
  private final Data data;

  /**
   * Constructor.
   * @param data data reference
   * @param info input info
   */
  public IndexStaticDb(final Data data, final InputInfo info) {
    super(info);
    this.data = data;
  }

  @Override
  public void checkUp() {
  }

  @Override
  public Expr compile(final CompileContext cc) {
    return this;
  }

  @Override
  public boolean has(final Flag... flags) {
    return false;
  }

  @Override
  public boolean inlineable(final Var var) {
    return true;
  }

  @Override
  public VarUsage count(final Var var) {
    return VarUsage.NEVER;
  }

  @Override
  public IndexDb inline(final Var var, final Expr ex, final CompileContext cc) {
    return null;
  }

  @Override
  public boolean accept(final ASTVisitor visitor) {
    return true;
  }

  @Override
  public int exprSize() {
    return 1;
  }

  @Override
  public IndexDb copy(final CompileContext cc, final IntObjMap<Var> vm) {
    return new IndexStaticDb(data, info);
  }

  @Override
  public Data data() {
    return data;
  }

  @Override
  Data data(final QueryContext qc) {
    return data;
  }

  @Override
  public boolean equals(final Object obj) {
    return obj instanceof IndexStaticDb && data == ((IndexStaticDb) obj).data && super.equals(obj);
  }

  @Override
  public void plan(final QueryPlan plan) {
    plan.add(plan.create(this));
  }

  @Override
  public String toString() {
    return Str.get(data.meta.name).toString();
  }
}
{'fraction_non_alphanumeric': 0.11240801826947475, 'fraction_numerical': 0.003552397868561279, 'mean_word_length': 3.1320754716981134, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7488713', 'n_tokens_mistral': 1281, 'n_tokens_neox': 1235, 'n_words': 373}