Executes the specified select statement against SimpleDB using default options
and returns only the first attribute value in the result set.
Namespace: SimolAssembly: Simol (in Simol.dll) Version: 1.0.0.0
Syntax
C# |
---|
public Object SelectScalar<T>( string selectStatement, params CommandParameter[] selectParams ) |
Visual Basic |
---|
Public Function SelectScalar(Of T) ( _ selectStatement As String, _ ParamArray selectParams As CommandParameter() _ ) As Object |
Visual C++ |
---|
public: generic<typename T> virtual Object^ SelectScalar( String^ selectStatement, ... array<CommandParameter^>^ selectParams ) sealed |
Parameters
- selectStatement
- Type: System..::..String
The select statement to execute.
- selectParams
- Type: array<Simol..::..CommandParameter>[]()[][]
The select parameter values.
Type Parameters
- T
Return Value
The first attribute of the first item in the result set or null if there are no results.Implements
ISimol..::..SelectScalar<(Of <<'(T>)>>)(String, array<CommandParameter>[]()[][])Remarks
This method supports use of the SimpleDB "count" keyword. For example: select count(*) from MyDomain
Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | If the selectStatement parameter is null |
System..::..ArgumentOutOfRangeException | If the selectStatement parameter is empty |
AmazonSimpleDBException | If the request to SimpleDB fails for any reason |
Simol..::..SimolDataException | If the SimpleDB item cannot be converted into the requested item type |
Simol..::..SimolConfigurationException | If no valid SimpleDB mapping can be configured for the requested item type |