Invokes select queries that use parameter lists (with IN clauses) by splitting the parameter list across multiple invocations that are invoked in parallel.

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

Syntax

C#
public List<T> SelectWithList<T, P>(
	SelectCommand<T> command,
	List<P> paramValues,
	string paramName
)
Visual Basic
Public Function SelectWithList(Of T, P) ( _
	command As SelectCommand(Of T), _
	paramValues As List(Of P), _
	paramName As String _
) As List(Of T)
Visual C++
public:
generic<typename T, typename P>
List<T>^ SelectWithList(
	SelectCommand<T>^ command, 
	List<P>^ paramValues, 
	String^ paramName
)

Parameters

command
Type: Simol..::..SelectCommand<(Of <(<'T>)>)>
The command.
paramValues
Type: System.Collections.Generic..::..List<(Of <(<'P>)>)>
The param values.
paramName
Type: System..::..String
Name of the param.

Type Parameters

T
The item type
P
The select parameter type

Return Value

Remarks

It's often necessary to select multiple items from SimpleDB using a list of keys. For example, "select * from Employee where State in ('GA','VA','WA')". But this is difficult in practice because the SimpleDB IN clause is limited to 20 values.

SelectWithList allows you to provide a parameterized SelectCommand with an unlimited list of param values. The command is replicated and each instance run in parallel against SimpleDB. This effectively lets you use an IN clause with an unlimited number of parameters, with just a couple lines of code.

See Also