Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
166 lines (154 sloc) 6.83 KB
using System;
namespace Figaro
{
/// <summary>
/// <see cref="XQueryExpression"/> represents a parsed
/// XQuery expression, and is created by a call to
/// <see cref="XmlManager.Prepare(string,QueryContext)"/>.
/// </summary>
/// <remarks>
/// Parsed XQuery expressions are useful because they allow the cost of query parsing and optimization
/// to be amortized over many evaluations. If indices of a container that may be referenced
/// by a parsed XQuery expression are modified (e.g. add/drop an index) the
/// <see cref="XQueryExpression"/> object should be
/// regenerated by the application.
/// <para>
/// This object is free threaded, and can be safely shared among threads in an application.
/// </para>
/// </remarks>
/// <seealso cref="XmlManager.Prepare(string,QueryContext)"/>
/// <threadsafety static="true" instance="true"/>
public sealed class XQueryExpression : IDisposable
{
/// <summary>
/// Prevents a default instance of the XQueryExpression class from being created.
/// </summary>
private XQueryExpression() {}
/// <summary>
/// Evaluates (runs) an XQuery query that was previously prepared by
/// <see cref="XmlManager.Prepare(string,QueryContext)"/>.
/// </summary>
/// <param name="context">The <see cref="QueryContext"/> to use for this evaluation.</param>
/// <returns>
/// An <see cref="XmlResults"/> set.
/// </returns>
/// <remarks>
/// XQuery must restrict the scope of this query using either the <c>collection()</c> or the <c>doc()</c>
/// XQuery navigation functions, or an exception is thrown.
/// </remarks>
/// <seealso cref="QueryContext"/>
/// <seealso cref="XmlResults"/>
public XmlResults Execute(QueryContext context)
{
return null;
}
/// <summary>
/// Evaluates (runs) an XQuery query that was previously prepared by
/// <see cref="XmlManager.Prepare(string,QueryContext)"/>.
/// </summary>
/// <param name="context">The <see cref="QueryContext"/> to use for this evaluation.</param>
/// <param name="queryOptions">One or more options for querying containers.</param>
/// <returns>
/// An <see cref="XmlResults"/> set.
/// </returns>
/// <remarks>
/// XQuery must restrict the scope of this query using either the <c>collection()</c> or the <c>doc()</c>
/// XQuery navigation functions, or an exception is thrown.
/// </remarks>
/// <seealso cref="QueryContext"/>
/// <seealso cref="QueryOptions"/>
/// <seealso cref="XmlResults"/>
public XmlResults Execute(QueryContext context, QueryOptions queryOptions)
{
return null;
}
/// <summary>
/// Evaluates (runs) an XQuery query that was previously prepared by
/// <see cref="XmlManager.Prepare(string,QueryContext)"/>.
/// </summary>
/// <param name="contextItem">The <see cref="XmlValue"/> object to perform the query against.</param>
/// <param name="context">The <see cref="QueryContext"/> to use for this evaluation.</param>
/// <param name="queryOptions">One or more options for querying containers.</param>
/// <returns>
/// An <see cref="XmlResults"/> set.
/// </returns>
/// <seealso cref="XmlValue"/>
/// <seealso cref="QueryContext"/>
/// <seealso cref="QueryOptions"/>
/// <seealso cref="XmlResults"/>
public XmlResults Execute(XmlValue contextItem, QueryContext context, QueryOptions queryOptions)
{
return null;
}
/// <summary>
/// Evaluates (runs) an XQuery query that was previously prepared by
/// <see cref="XmlManager.Prepare(string,QueryContext)"/> in a transaction.
/// </summary>
/// <param name="transaction">The transaction.</param>
/// <param name="contextItem">The <see cref="XmlValue"/> object to perform the query against.</param>
/// <param name="context">The <see cref="QueryContext"/> to use for this evaluation.</param>
/// <param name="queryOptions">One or more options for querying containers.</param>
/// <returns>
/// An <see cref="XmlResults"/> set.
/// </returns>
/// <seealso cref="XmlValue"/>
/// <seealso cref="QueryContext"/>
/// <seealso cref="QueryOptions"/>
/// <seealso cref="XmlResults"/>
public XmlResults Execute(XmlTransaction transaction, XmlValue contextItem, QueryContext context, QueryOptions queryOptions)
{
return null;
}
/// <summary>
/// Evaluates (runs) an XQuery query that was previously prepared by
/// <see cref="XmlManager.Prepare(string,QueryContext)"/>.
/// </summary>
/// <param name="transaction">The transaction.</param>
/// <param name="context">The <see cref="QueryContext"/> to use for this evaluation.</param>
/// <param name="queryOptions">One or more options for querying containers.</param>
/// <returns>
/// An <see cref="XmlResults"/> set.
/// </returns>
/// <seealso cref="XmlValue"/>
/// <seealso cref="QueryContext"/>
/// <seealso cref="QueryOptions"/>
/// <seealso cref="XmlResults"/>
public XmlResults Execute(XmlTransaction transaction, QueryContext context, QueryOptions queryOptions)
{
return null;
}
/// <summary>
/// Gets the query.
/// </summary>
/// <value>
/// Show the query associated with the <see cref="XQueryExpression"/>.
/// </value>
/// <seealso cref="XQueryExpression"/>
public string Query { get { return string.Empty; }}
/// <summary>
/// Gets a value indicating whether the query is an updating expression.
/// </summary>
/// <value>
/// Gets the boolean value determining whether or not the query is an updating expression.
/// </value>
public bool IsUpdateExpression { get { return false; } }
/// <summary>
/// Gets the query plan.
/// </summary>
/// <value>
/// Show the query plan prepared by the <see cref="XQueryExpression"/>.
/// </value>
/// <seealso cref="XQueryExpression"/>
public string QueryPlan { get { return string.Empty; }}
#region IDisposable Members
/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
/// <filterpriority>2</filterpriority>
public void Dispose()
{
throw new NotImplementedException();
}
#endregion
}
}