Handles zero, one, or more phrases, returning a
standard SQL or clause.
Namespace: CleanCode.DataAssembly: CleanCode (in CleanCode.dll) Version: 1.2.3.0 (1.2.03)
public string GetAlternation(
params string[] phrase
)
Public Function GetAlternation ( _
ParamArray phrase As String() _
) As String
Public Function GetAlternation ( _
ParamArray phrase As String() _
) As String
public:
String^ GetAlternation(
... array<String^>^ phrase
)
public:
String^ GetAlternation(
... array<String^>^ phrase
)
Parameters
- phrase
- Type: System String
List of zero or more
phrases to combine.
Return Value
SQL predicate with 'OR' operators as necessary.
With an argument list of, e.g., "phrase-x", "phrase-y", "phrase-z",
the result will be
(phrase-x OR phrase-y OR phrase-Z).
Use
GetPhrase(String, String ) to generate the individual phrases
passed as arguments to this method.
This method is well-suited to automatic clause generation
because any null or zero-length arguments will be skipped.
See
GetConjunction( String ) for an example of how this saves
a lot of unnecessary coding on your part.