Executes the specified select command against SimpleDB without an item type generic parameter and returns only the first attribute value in the result set.

Namespace: Simol
Assembly: Simol (in Simol.dll) Version: 1.0.0.0

Syntax

C#
public Object SelectScalar(
	SelectCommand command
)
Visual Basic
Public Function SelectScalar ( _
	command As SelectCommand _
) As Object
Visual C++
public:
virtual Object^ SelectScalar(
	SelectCommand^ command
) sealed

Parameters

command
Type: Simol..::..SelectCommand
The command to execute.

Return Value

The first attribute of the first item in the result set or null if there are no results.

Implements

ISimol..::..SelectScalar(SelectCommand)

Remarks

This method supports use of the SimpleDB "count" keyword. For example: select count(*) from MyDomain

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionIf the command parameter is null
AmazonSimpleDBExceptionIf the request to SimpleDB fails for any reason
Simol..::..SimolDataExceptionIf the SimpleDB item cannot be converted into the requested item type
Simol..::..SimolConfigurationExceptionIf no valid SimpleDB mapping can be configured for the requested item type

See Also