-
-
Notifications
You must be signed in to change notification settings - Fork 513
/
Copy pathExpressions.cs
28 lines (27 loc) · 941 Bytes
/
Expressions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
namespace SqlKata
{
public static class Expressions
{
/// <summary>
/// Instruct the compiler to resolve the value from the predefined variables
/// In the current query or parents queries.
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public static Variable Variable(string name)
{
return new Variable(name);
}
/// <summary>
/// Instruct the compiler to treat this as a literal.
/// WARNING: don't pass user data directly to this method.
/// </summary>
/// <param name="value"></param>
/// <param name="replaceQuotes">if true it will esacpe single quotes</param>
/// <returns></returns>
public static UnsafeLiteral UnsafeLiteral(string value, bool replaceQuotes = true)
{
return new UnsafeLiteral(value, replaceQuotes);
}
}
}