NPersistence Reference Guide

The Query type exposes the following methods.

Methods

 Public

 Protected
 Instance

 Static
 Declared

 Inherited
 XNA Framework Only

 .NET Compact Framework Only

 MemberDescription
ExecuteUpdate()()()()
Execute an update or delete statement.
GetFirstResult()()()()
The position of the first result the query object was set to retrieve. Returns 0 if setFirstResult was not applied to the query object.
GetFlushMode()()()()
Get the flush mode in effect for the query execution. If a flush mode has not been set for the query object, returns the flush mode in effect for the entity manager.
GetHints()()()()
Get the properties and hints and associated values that are in effect for the query instance.
GetLockMode()()()()
Get the current lock mode for the query.
GetMaxResults()()()()
The maximum number of results the query object was set to retrieve. Returns Integer.MAX_VALUE if setMaxResults was not applied to the query object.
GetParameter<(Of <<'(T>)>>)(Int32)
Get the parameter object corresponding to the declared positional parameter with the given position. This method is not required to be supported for native queries.
GetParameter<(Of <<'(T>)>>)(String)
Get the parameter object corresponding to the declared parameter of the given name. This method is not required to be supported for native queries.
GetParameter<(Of <<'(T>)>>)(Int32, Type)
Get the parameter object corresponding to the declared positional parameter with the given position and type. This method is not required to be supported by the provider.
GetParameter<(Of <<'(T>)>>)(String, Type)
Get the parameter object corresponding to the declared parameter of the given name and type. This method is required to be supported for criteria queries only.
GetParameters()()()()
Get the parameter objects corresponding to the declared parameters of the query. Returns empty set if the query has no parameters. This method is not required to be supported for native queries.
GetParameterValue(Int32)
Return the value bound to the positional parameter.
GetParameterValue(String)
Return the value bound to the named parameter.
GetParameterValue<(Of <<'(T>)>>)(Parameter<(Of <<'(T>)>>))
Return the value bound to the parameter.
GetResultList()()()()
Execute a SELECT query and return the query results as an untyped List.
GetSingleResult()()()()
Execute a SELECT query that returns a single untyped result.
IsBound<(Of <<'(T>)>>)(Parameter<(Of <<'(T>)>>))
Return a boolean indicating whether a value has been bound to the parameter.
SetFirstResult(Int32)
Set the position of the first result to retrieve.
SetFlushMode(FlushModeType)
Set the flush mode type to be used for the query execution. The flush mode type applies to the query regardless of the flush mode type in use for the entity manager.
SetHint(String, Object)
Set a query property or hint. The hints elements may be used to specify query properties and hints. Properties defined by this specification must be observed by the provider. Vendor-specific hints that are not recognized by a provider must be silently ignored. Portable applications should not rely on the standard timeout hint. Depending on the database in use and the locking mechanisms used by the provider, this hint may or may not be observed.
SetLockMode(LockModeType)
Set the lock mode type to be used for the query execution.
SetMaxResults(Int32)
Set the maximum number of results to retrieve.
SetParameter(Int32, Object)
Bind an argument to a positional parameter.
SetParameter(String, Object)
Bind an argument to a named parameter.
SetParameter<(Of <<'(T>)>>)(Parameter<(Of <<'(T>)>>), T)
Bind the value of a Parameter object.
SetParameter(Int32, DateTime, TemporalType)
Bind an instance of System.DateTime to a positional parameter.
SetParameter(String, DateTime, TemporalType)
Bind an instance of System.DateTime to a named parameter.
SetParameter(Parameter<(Of <<'(DateTime>)>>), DateTime, TemporalType)
Bind an instance of System.DateTime to a Parameter object.
Unwrap<(Of <<'(T>)>>)(Type)
Return an object of the specified type to allow access to the provider-specific API. If the provider's query implementation does not support the specified class, the PersistenceException is thrown.

See Also