[This is preliminary documentation and is subject to change.]
Defines a query sent into ICRUDDataStore implementor to retrieve data.
A Query is a named bag of paremeters where every parameter has a name and the value.
System Object
System.Collections.Generic List Query Param NFX.DataAccess.CRUD Query NFX.DataAccess.CRUD Query TResultRow Namespace: NFX.DataAccess.CRUDAssembly: NFX (in NFX.dll) Version: 3.0.0.1 (3.0.0.1)
[SerializableAttribute]
public class Query : List<Query..::..Param>,
IParameters, INamed, ICacheParams
[SerializableAttribute]
public class Query : List<Query..::..Param>,
IParameters, INamed, ICacheParams
<SerializableAttribute>
Public Class Query
Inherits List(Of Query..::..Param)
Implements IParameters, INamed, ICacheParams
<SerializableAttribute>
Public Class Query
Inherits List(Of Query..::..Param)
Implements IParameters, INamed, ICacheParams
[SerializableAttribute]
public ref class Query : public List<Query..::..Param^>,
IParameters, INamed, ICacheParams
[SerializableAttribute]
public ref class Query : public List<Query..::..Param^>,
IParameters, INamed, ICacheParams
[<SerializableAttribute>]
type Query =
class
inherit List<Query..::..Param>
interface IParameters
interface INamed
interface ICacheParams
end
[<SerializableAttribute>]
type Query =
class
inherit List<Query..::..Param>
interface IParameters
interface INamed
interface ICacheParams
end
Keep in mind that a particular datastore implementation may have to deal with hybrid distributed backends where different tables get stored
in different repositories (different architectures i.e. NoSQL, HDFS, and some RDB SQL all in different locations),
consequently one can not make assumption about writing SQLs of any kind in business code - that is what CRUD concept is for as it abstracts
this into provider implementation.
Architectural note: unlike Hibernate, LinqTo* and the like, the NFX.CRUD architecture purposely does not allow developers
to write query scripts in higher-language like C#. This is because translation of such a high-level language abstraction into
highly optimized SQL/(and or other script) per particular backend is impossible because such language can not incapsulate
the optimization features of all possible data backends (i.e. ORACLE vs MongoDB vs Redis vs Files in HDFS).
CRUD queries need to support selects from tables with millions of rows, or reads from collections with millions of documents,
or parse millions of lines from files stored in Hadooop servers, thus every particular provider for every particular business app
must expose custom-written queries by name. Those queries are usually highly optimized for particular platform
(i.e. using db-specific hints, common table subexpressions, groupping sets etc.).
Also, a provider may elect to SELECT * from a table named like Query object, when a hand-written script with such name is not found