Click or drag to resize

DirectFunctionsSelect Method

Linkar Framework for .NET and Core


Executes a Query in the Database, synchronously only.

Namespace: Linkar.Functions.Direct
Assembly: Linkar.Functions.Direct (in Linkar.Functions.Direct.dll) Version: 2.3.1
Syntax
public static string Select(
	CredentialOptions credentialOptions,
	string filename,
	string selectClause = "",
	string sortClause = "",
	string dictClause = "",
	string preSelectClause = "",
	SelectOptions selectOptions = null,
	DATAFORMATCRU_TYPE outputFormat = DATAFORMATCRU_TYPE.MV,
	string customVars = "",
	int receiveTimeout = 0
)

Parameters

credentialOptions  CredentialOptions
Object with data necessary to access the Linkar Server: Username, Password, EntryPoint, Language, FreeText.
filename  String
Name of file on which the operation is performed. For example LK.ORDERS
selectClause  String  (Optional)
Statement fragment specifies the selection condition. For example WITH CUSTOMER = '1'
sortClause  String  (Optional)
Statement fragment specifies the selection order. If there is a selection rule, Linkar will execute a SSELECT, otherwise Linkar will execute a SELECT. For example BY CUSTOMER
dictClause  String  (Optional)
Space-delimited list of dictionaries to read. If this list is not set, all fields are returned. For example CUSTOMER DATE ITEM. You may use the format LKFLDx where x is the attribute number.
preSelectClause  String  (Optional)
An optional command that executes before the main Select
selectOptions  SelectOptions  (Optional)
Object with options to manage how records are selected, including calculated, dictionaries, conversion, formatSpec, originalRecords, onlyItemId, pagination, regPage, numPage.
outputFormat  DATAFORMATCRU_TYPE  (Optional)
Indicates in what format you want to receive the data resulting from the Read, New, Update and Select operations: MV, XML, XML_DICT, XML_SCH, JSON, JSON_DICT or JSON_SCH.
customVars  String  (Optional)
Free text sent to the database allows management of additional behaviours in SUB.LK.MAIN.CONTROL.CUSTOM, which is called when this parameter is set.
receiveTimeout  Int32  (Optional)
Maximum time in seconds that the client will wait for a response from the server. Default = 0 to wait indefinitely.

Return Value

String
The results of the operation.
Remarks
In the preSelectClause argument these operations can be carried out before executing the Select statement:
  • Previously call to a saved list with the GET.LIST command to use it in the Main Select input
  • Make a previous Select to use the result as the Main Select input, with the SELECT or SSELECT commands.In this case the entire sentence must be indicated in the PreselectClause. For example:SSELECT LK.ORDERS WITH CUSTOMER = '1'
  • Exploit a Main File index to use the result as a Main Select input, with the SELECTINDEX command. The syntax for all the databases is SELECTINDEX index.name.value. For example SELECTINDEX ITEM,"101691"
See Also