Method UserTableGetRecordsCount
UserTableGetRecordsCount(String, String, String, List<WhereClauseElementContract>)
Gets the count of rows from a user table
Declaration
int UserTableGetRecordsCount(string connectionId, string userTable, string whereClause, List<WhereClauseElementContract> whereClauseElements)
Parameters
Type | Name | Description |
---|---|---|
System.String | connectionId | The connection id to identify your connection. See also ConnectionId |
System.String | userTable | Name of the user table |
System.String | whereClause | Deprecated: Use instead |
System.Collections.Generic.List<WhereClauseElementContract> | whereClauseElements | Optional: A list of SQL where clause elements. Can be null. See also WhereClauseElementContract |
Returns
Type | Description |
---|---|
System.Int32 | Number of rows in a user table |
Examples
POST https://YourServerName/InfoShare/Json/UserTable/UserTableGetRecordsCount
This example gets the row count from a user table.{
"connectionId": "b545b999-f55b-42b2-a141-9df3d3d5a2e0",
"userTable": "UserTable_Test1"
}
Response:
{
"UserTableGetRecordsCountResult": 4
}
Exceptions
Type | Condition |
---|---|
ServiceException | The connection id {connectionId} isn't valid or has expired (10008) |
ServiceException | Verification code is needed: Verification code not yet verified (10152) |
ServiceException | Table name '{userTable}' is invalid. Allowed characters are: {allowedCharacters} (10184) |
ServiceException | Parameter whereClauseElements[{whereClauseIndex}].RelationalOperator is invalid: Could not parse string '{relationalOperatorStr}' to a valid relational operator. Valid relational operators are: {allowedRelationalOperators} (10191) |
ServiceException | Parameter whereClauseElements[{whereClauseIndex}].LogicalOperator is invalid: Could not parse string '{logicalOperatorStr}' to a valid logical operator. Valid logical operators are: {allowedLogicalOperators} (10192) |
ServiceException | Parameter whereClauseElements[{i}].ColumnName is missing (10194) |
ServiceException | Parameter whereClauseElements[{i}].RelationalOperator is missing (10195) |
ServiceException | Parameter whereClauseElements[{i}].LogicalOperator is missing (10196) |
ServiceException | Parameter whereClauseElements[{i}].Value cannot be null. Value can only be null, if whereClauseElements[{i}].RelationalOperator is {RelationalOperator.Equals} or {RelationalOperator.NotEquals} (10197) |
ServiceException | Parameter whereClauseElements[{i}].LogicalOperator is superfluous because no condition follows (10198) |
ServiceException | Parameter whereClauseElements[{whereClauseIndex}].EscapeCharacter is invalid: Could not parse string '{escapeCharacterStr}' to a valid escape character. Valid escape character is: {allowedEscapeCharacter} (10199) |
ServiceException | Parameter whereClauseElements[{i}].EscapeCharacter is not allowed because the relational operator is neither {RelationalOperator.Like} nor {RelationalOperator.NotLike} (10200) |
ServiceException | Table name '{userTable}' does not exist (10219) |
ServiceException | Not enough rights ({accessOperationName}, {accessOperationId}) (10071) |