Member

Determine setting for each data member that present in loaded result set from data providers.

structure of member tag
1
2
3
<member name="" preview="" postsql="" sort="" >
   [raw-content]
</member>
structure of void member tag
1
<member name="" preview="" postsql="" sort="" type=""/>

Important

The member tag has no child tags.

Attributes

name string required [##-notaion

Determine name for data member. This name in concatinate with sourcecommand name attributes, make data member name.

preview boolean optional [##-notaion

Boolean flag that determine preview of data add to end of document or not. Using this attributes in debug mode, help to see data reterned from providers. Default value for preview is false.

postsql string optional [##-notaion

Full sql select query that apply to data in-memory after loading from provider and before add to context. Use this attribute for do projection over data outside of data provider. Default value for postsql is null.

sort string optional [##-notaion

Ordering clauses of sql query that can use for apply in-memory ordering over loaded data from provider. Default value for sort is null.

type MemberType optional

This attribute only use in InlineSource command for determine format of embedded data in member tag. Default value is table. For more information about MemberType enum, see MemberType.

Tip

For best performance, we recommend to apply sorting or projection inside data providers. use postsql or sort attribute only if other choice not exists.

raw-content xml|json [##-notaion

In some type of source command like InlineSource, raw-data present inline-data that must interpret online and add to context as data source. In member tag, child elements considered as raw-content.

Note

For see more Information about [##-notaion,see [## Notation

Remarks

Each source command present result set that consist of one or more data source (collection or table). In fact each member tag of command represent information about each data source, loaded from underlying data provider. For example suppose:

1
2
3
<basis core='dbsource' name='db' run='atclient' source='basiscore' >
   <member name='product-list'   />
</basis>

After execute this command, as we see one member tag in command body ,structure of loaded result can be forecasted. A result set that contain one data source with db.product-list name. Main usage of member tag is add some setting to manage process of adding loaded data source to Context.

preview

First attribute that must be describe is preview. If this attribute set to true, loaded data after process with other attribute of member, add to bottom if document as table tag. This attribute use in debugging and display data in development environment. For sample, see Get start example.

postsql

With this attribute you can change projection of data and present new one with apply simple sql query. This document not going to learn sql but suppose:

1
2
3
<basis core='dbsource' name='db' run='atclient' source='basiscore' >
   <member name='product-list' postsql='select *  from db.product-list where seo = 1'   />
</basis>

Now before adding data source to context, data item(s) that has seo field with value not equal 1 remove from it.

Tip

For Learn about Sql, visit SQL Tutorial in w3schools.

sort

The sourt attribute can contain order clauses of a sql query. this attribute contains the column name followed by ASC (ascending) or DESC (descending). Columns are sorted ascending by default. Multiple columns can be separated by commas.

In fact postsql attribute can use instead of sort but process of executing postsql is complex , time consuming and use more hardware resource like RAM and CPU.

For example:

1
2
3
<basis core='dbsource' name='db' run='atclient' source='basiscore' >
   <member name='product-list' sort ='title asc,name desc'  />
</basis>

Ordering loaded data against title column ascending and then against name column descending.