DataSources are objects which deliver one or many DataStreams, which contain a bunch of content-items. They are then attached to each other (from one sources
Out to another ones
In) creating a
Query. Queries can be customized at will. The whole system is used to prepare/process data for views, WebApi or anything else.
In most cases there will be a VisualQuery which connects all the parts automatically, but when you want to work with them programatically, here you'll find the API.
We've hidden the constructors for all DataSource objects in these docs, because you should usually use the
CreateSource<T>(...) command on the Razor template or WebApi, which will auto-configure things behind the scenes.
Read about DataSources here. It also explains how the configuration system works and how to create custom DataSources to deliver your data to EAV/2sxc.
All the data inside an App.
For example, it has a variable amount of Out-streams, one for each content-type in the app.
The App Root is the entry point for all data. It takes it's data from a hidden AppState Cache.
It's implemented as a DataSource so that other DataSources can easily attach to it.
This is also the object returned as the root in any query.
DataSource to only pass through configured AttributeNames - other attributes/properties are removed from the entities.
DataSource to rename attributes. Will help to change internal field names to something which is more appropriate for your JS or whatever.
DataSource for importing/reading CSV files.
The base class, which should always be inherited. Already implements things like Get One / Get many, Caching and a lot more.
Provide Entities from a System.Data.DataTable.
This is not meant for VisualQuery, but for code which pre-processes data in a DataTable and then wants to provide it as entities.
A DataSource that filters Entities by Ids. Can handle multiple IDs if comma-separated.
Keep only entities of a specific content-type
Internal DataSource to generate an error on purpose. This is to test / verify error handling in VisualQuery. See also VisualQuery 3: Debugging
Base DataSource class for providing data from external systems
A DataSource that removes duplicate items in a Stream. Often used after a StreamMerge.
Remodels multi-language values in own fields (like NameDe, NameEn) to single multi-language fields like Name
Filter entities to show only these belonging to a specific user.
Do Paging to only return a limited amount of results + show how many such pages exist and which Page we are on.
A DataSource that forwards all
In Connections. It's more for internal use.
Filter entities to show Drafts or only Published Entities
Run another query and provide the resulting data. The settings will provide the params for the inner query.
Filter Entities by Value in a Related Entity. For example: Find all Books (desired Entity), whose Authors (related Entity) have a Country (Attribute) with 'Switzerland' (Value).
DataSource which changes how Streams will be serialized in the end.
Shuffle / Randomize the order of items in a Stream.
Provide Entities from a SQL Server
A DataSource that returns the first stream which has content
A DataSource that merges all streams on the
In into one
A DataSource that returns a stream by the provided name. Usually this will be configured through [Params:SomeName]
Use this to take imported data from elsewhere which is a table but would have a tree-like structure (folders, etc.). Tell it where/how the relationships are mapped, and it will create Entities that have navigable relationships for this.
Return only Entities having a specific value in an Attribute/Property
Sort Entity by values in specified Attributes / Properties
Marks objects which can convert a DataSource to another format.
This will always return some kind of dictionary with stream-names and the converted items as sub-lists. Usually used in serialization scenarios.
Shared properties of IDataSource and IDataTarget
Public interface for an Eav DataSource. All DataSource objects are based on this.
This helps a data source get configured. It manages all the properties which the data source will want to look up, as well as the LookUp engine which will perform the token resolution
Represents a DataStream object. This is a stream of IEntity objects, which has a source and a name. A stream can be read from, and it can be attached to upstream data-sources for further processing.
Represents a data source that can be the recipient of Data. This basically means it has an In IDataStream