Source Commands

This type of commands use for load data from data provider’s (Inline, Sql-Server, Mongo, Sqlite ,WebAPI and etc) and expose to commands via Context. for more information see Data Providers.

Note

The SourceCommand inherit from CommandBase Class.

Important

name attribute in source command is required and must be set.

Since most of SourceCommand type send command tags completely as raw text for data provider , SourceCommand can contain custom attribute(s) as unknowns-attributes for send extra data for provider.

general structure of Source commands
1
2
3
4
<basis source="basiscore" >
   <params>...</params>
   <member>...</member>
</basis>

Attributes

source string required [##-notaion

Determine data source name that serve to get connection setting for connect to data provider and load data.

unknowns-attributes string optional multi [##-notaion

Use for send extra data for provider.

Tags

params optional single

Use this tag for add extra parameters to command and send to data provider for use in generate data process. for more information see Params.

member required multi

Determine setting form each data member that present in loaded result set from data providers. for more information see Member.

Note

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

Remarks

Others program’s elements for access to source command loaded data source, use name attribute of command and related member’s name. Suppose this source command:

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

After Execution of command, some data source load from data provider. This data must have name form accessibility. So other parts of program like commands can access to it. Name of loaded data source, create from concatenation of command name attribute with member name attribute with delimiter. So data source add with db.product-list and other command access to it wia this name:

1
2
3
<basis core='print' datamembername='db.product-list'>
   [...]
</basis>

Also in source command, unknowns-attributes is Important and use for inject extra data to command for use in data provider. For example suppose:

1
2
3
<basis core='dbsource' name='db' run='atclient' source='basiscore' mid='10' lid='1' userid='122504' ownerid='7660' rkey='289979947718473-59625461925771' dmnid='4312'>
   <member name='product-list' type='list' link='/owner_profile.bc' propertyid='8139,8140,87816,87817,87881' order='id desc' perpage='30' pageno='1' />
</basis>

In above example, command tag attributes like mid, lid, userid, ownerid or rkey is unknowns attributes. Also member tag hse some unknowns attributes like link and propertyid. This type of attribute has no manning in commands and only process in underlying data providers.