comparison Tools/DocGen/Content/Doc/Data/LinqStringCoreFunctions.txt @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f990fcb411a9
1 *
2 | LIKE | s.Contains("abc") | s LIKE '%abc%'
3 | LIKE | s.Contains("a%b") | s LIKE '%a~%b%' ESCAPE '~'
4 | LIKE | s.Contains(str) | s LIKE @str ESCAPE '~'
5 | LIKE | !s.Contains(a) | s NOT LIKE a
6 | LIKE | s.StartsWith("abc") | s LIKE 'abc%'
7 | LIKE | s.EndsWith("abc") | s LIKE '%abc'
8 | LIKE | SqlMethods.Like(s, "%abc%") | s LIKE '%abc%'
9 | LIKE | SqlMethods.Like(s, "a~%b", '~') | s LIKE "a~%b" ESCAPE '~'
10 | LIKE | Sql.Like(s, "%abc%") | s LIKE '%abc%'
11 | LIKE | Sql.Like(s, "a~%b", '~') | s LIKE "a~%b" ESCAPE '~'
12 | Length | Sql.Length(s) | Length(s)
13 | Trim | Sql.Trim(s) | Trim(s)
14 | Trim | Sql.TrimLeft(s) | LTrim(s)
15 | Trim | Sql.TrimRight(s) | RTrim(s)
16 | Case | Sql.Lower(s) | Lower(s)
17 | Case | Sql.Upper(s) | Upper(s)
18
19 * DB2
20 | CharIndex | Sql.CharIndex(a, s) | Locate(a, s)
21 | CharIndex | Sql.CharIndex(a, s, b) | Locate(a, s, b)
22 | Substring | Sql.Substring(s, a, b) | Substr(s, a, b)
23 | Substring | Sql.Left(s, a) | Left(s, a)
24 | Substring | Sql.Right(s, a) | Right(s, a)
25 | Stuff | Sql.Stuff(s, a, b, c) | Substring(s, 1, a-1) + c + Substring(s, a+b, Length(s)-a-b+1))
26 | Space | Sql.Space(a) | VarChar(<br>&nbsp;Repeat(' ', a), 1000)
27 | Pad | Sql.PadRight(s, a, b) | s || VarChar(Repeat(<br>&nbsp;b, a-Length(s)), 1000)
28 | Pad | Sql.PadLeft(s, a, b) | VarChar(Repeat(b,<br>&nbsp;a-Length(s)), 1000) || s
29 | Replace | Sql.Replace(s, a, b) | Replace(s, a, b)
30
31 * Informix
32 | LIKE | !s.Contains(a) | NOT s LIKE a
33 | Substring | Sql.Substring(s, a, b) | Substr(s, a, b)
34 | Substring | Sql.Left(s, a) | Substr(s, 1, a)
35 | Substring | Sql.Right(s, a) | Substr(s,<br>&nbsp;&nbsp;Length(s)-a+1, a)
36 | Stuff | Sql.Stuff(s, a, b, c) | Substring(s, 1, a-1) + c + Substring(s, a+b, Length(s)-a-b+1))
37 | Space | Sql.Space(a) | RPad(' ', a, ' ')
38 | Pad | Sql.PadRight(s, a, b) | RPad(s, a, b)
39 | Pad | Sql.PadLeft(s, a, b) | LPad(s, a, b)
40 | Replace | Sql.Replace(s, a, b) | Replace(s, a, b)
41
42 * Oracle
43 | CharIndex | Sql.CharIndex(a, s) | InStr(s, a)
44 | CharIndex | Sql.CharIndex(a, s, b) | InStr(s, a, b)
45 | Substring | Sql.Substring(s, a, b) | Substr(s, a, b)
46 | Substring | Sql.Left(s, a) | Substr(s, 1, a)
47 | Substring | Sql.Right(s, a) | Substr(s,<br>&nbsp;&nbsp;Length(s)-a+1, a)
48 | Reverse | Sql.Reverse(s) | Reverse(s)
49 | Stuff | Sql.Stuff(s, a, b, c) | Substring(s, 1, a-1) + c + Substring(s, a+b, Length(s)-a-b+1))
50 | Space | Sql.Space(a) | RPad(' ', a, ' ')
51 | Pad | Sql.PadRight(s, a, b) | RPad(s, a, b)
52 | Pad | Sql.PadLeft(s, a, b) | LPad(s, a, b)
53 | Replace | Sql.Replace(s, a, b) | Replace(s, a, b)
54
55 * Firebird
56 | Length | Sql.Length(s) | Char_Length(s)
57 | Substring | Sql.Substring(s, a, b) | Substring(<br>&nbsp;s from a for b)
58 | Substring | Sql.Left(s, a) | Left(s, a)
59 | Substring | Sql.Right(s, a) | Right(s, a)
60 | Reverse | Sql.Reverse(s) | Reverse(s)
61 | Stuff | Sql.Stuff(s, a, b, c) | Substring(s, 1, a-1) + c + Substring(s, a+b, Length(s)-a-b+1))
62 | Space | Sql.Space(a) | RPad(' ', a, ' ')
63 | Pad | Sql.PadRight(s, a, b) | RPad(s, a, b)
64 | Pad | Sql.PadLeft(s, a, b) | LPad(s, a, b)
65 | Replace | Sql.Replace(s, a, b) | Replace(s, a, b)
66
67 * PostgreSQL
68 | CharIndex | Sql.CharIndex(a, s) | Position(a in s)
69 | CharIndex | Sql.CharIndex(a, s, b) | Position(a in Substring(s, b, <br>&nbsp;&nbsp;Length(s)-b)) + b-1
70 | Substring | Sql.Substring(s, a, b) | Substring(s, a, b)
71 | Substring | Sql.Left(s, a) | Substring(s, 1, a)
72 | Substring | Sql.Right(s, a) | Substring(s, Length(s)-a+1, a)
73 | Reverse | Sql.Reverse(s) | Reverse(s) -- <i>implemented as UDF<i>
74 | Stuff | Sql.Stuff(s, a, b, c) | Substring(s, 1, a-1) + c + Substring(s, a+b, Length(s)-a-b+1))
75 | Space | Sql.Space(a) | Repeat(' ', a)
76 | Pad | Sql.PadRight(s, a, b) | RPad(s, a, b)
77 | Pad | Sql.PadLeft(s, a, b) | LPad(s, a, b)
78 | Replace | Sql.Replace(s, a, b) | Replace(s, a, b)
79
80 * MySql
81 | CharIndex | Sql.CharIndex(a, s) | Locate(a, s)
82 | CharIndex | Sql.CharIndex(a, s, b) | Locate(a, s, b)
83 | Substring | Sql.Substring(s, a, b) | Substring(s, a, b)
84 | Substring | Sql.Left(s, a) | Left(s, a)
85 | Substring | Sql.Right(s, a) | Right(s, a)
86 | Reverse | Sql.Reverse(s) | Reverse(s)
87 | Stuff | Sql.Stuff(s, a, b, c) | Substring(s, 1, a-1) + c + Substring(s, a+b, Length(s)-a-b+1))
88 | Space | Sql.Space(a) | Space(a)
89 | Pad | Sql.PadRight(s, a, b) | RPad(s, a, b)
90 | Pad | Sql.PadLeft(s, a, b) | LPad(s, a, b)
91 | Replace | Sql.Replace(s, a, b) | Replace(s, a, b)
92
93 * MS SQL
94 | Length | Sql.Length(s) | Len(s)
95 | CharIndex | Sql.CharIndex(a, s) | CharIndex(a, s)
96 | CharIndex | Sql.CharIndex(a, s, b) | CharIndex(a, s, b)
97 | Substring | Sql.Substring(s, a, b) | Substring(s, a, b)
98 | Substring | Sql.Left(s, a) | Left(s, a)
99 | Substring | Sql.Right(s, a) | Right(s, a)
100 | Reverse | Sql.Reverse(s) | Reverse(s)
101 | Stuff | Sql.Stuff(s, a, b, c) | Stuff(s, a, b, c)
102 | Space | Sql.Space(a) | Space(a)
103 | Pad | Sql.PadRight(s, a, b) | s + Replicate(b, a - Len(s))
104 | Pad | Sql.PadLeft(s, a, b) | Replicate(b, a - Len(s)) + s
105 | Replace | Sql.Replace(s, a, b) | Replace(s, a, b)
106 | Trim | Sql.Trim(s) | LTrim(RTrim(s))
107
108 * SqlCe
109 | Length | Sql.Length(s) | Len(s)
110 | CharIndex | Sql.CharIndex(a, s) | CharIndex(a, s)
111 | CharIndex | Sql.CharIndex(a, s, b) | CharIndex(a, s, b)
112 | Substring | Sql.Substring(s, a, b) | Substring(s, a, b)
113 | Substring | Sql.Left(s, a) | Substring(s, 1, a)
114 | Substring | Sql.Right(s, a) | Substring(s,<br>&nbsp;&nbsp;Len(s)-a+1, a)
115 | Stuff | Sql.Stuff(s, a, b, c) | Stuff(s, a, b, c)
116 | Space | Sql.Space(a) | Space(a)
117 | Pad | Sql.PadRight(s, a, b) | s + Replicate(b, a - Len(s))
118 | Pad | Sql.PadLeft(s, a, b) | Replicate(b, a - Len(s)) + s
119 | Replace | Sql.Replace(s, a, b) | Replace(s, a, b)
120 | Trim | Sql.Trim(s) | LTrim(RTrim(s))
121
122 * Sybase
123 | Length | Sql.Length(s) | Len(s)
124 | CharIndex | Sql.CharIndex(a, s) | CharIndex(a, s)
125 | CharIndex | Sql.CharIndex(a, s, b) | CharIndex(a,Substring(<br>&nbsp;&nbsp;s, b, Len(s)-b)) + b - 1
126 | Substring | Sql.Substring(s, a, b) | Substring(s, a, b)
127 | Substring | Sql.Left(s, a) | Left(s, a)
128 | Substring | Sql.Right(s, a) | Right(s, a)
129 | Reverse | Sql.Reverse(s) | Reverse(s)
130 | Stuff | Sql.Stuff(s, a, b, c) | Stuff(s, a, b, c)
131 | Space | Sql.Space(a) | Space(a)
132 | Pad | Sql.PadRight(s, a, b) | s + Replicate(b, a - Len(s))
133 | Pad | Sql.PadLeft(s, a, b) | Replicate(b, a - Len(s)) + s
134 | Replace | Sql.Replace(s, a, b) | Str_Replace(s, a, b)
135 | Trim | Sql.Trim(s) | LTrim(RTrim(s))
136
137 * SQLite
138 | CharIndex | Sql.CharIndex(a, s) | CharIndex(a, s)
139 | CharIndex | Sql.CharIndex(a, s, b) | CharIndex(a, s, b)
140 | Substring | Sql.Substring(s, a, b) | Substr(s, a, b)
141 | Substring | Sql.Left(s, a) | LeftStr(s, a)
142 | Substring | Sql.Right(s, a) | RigthStr(s, a)
143 | Reverse | Sql.Reverse(s) | Reverse(s)
144 | Stuff | Sql.Stuff(s, a, b, c) | Substring(s, 1, a-1) + c +<br>Substring(s, a+b, Length(s)-a-b+1))
145 | Space | Sql.Space(a) | PadR(' ', a)
146 | Pad | Sql.PadRight(s, a, b) | s + Replicate(b, a - Len(s))
147 | Pad | Sql.PadLeft(s, a, b) | Replicate(b, a - Len(s)) + s
148 | Replace | Sql.Replace(s, a, b) | Replace(s, a, b)
149
150 * Access
151 | LIKE | s.Contains("a%b") | s LIKE "%a[%]b%"
152 | LIKE | s.Contains(str) | s LIKE @str
153 | LIKE | SqlMethods.Like(s, "a~%b", '~') | s LIKE "a[%]b"
154 | LIKE | Sql.Like(s, "a~%b", '~') | s LIKE "a[%]b"
155 | Length | Sql.Length(s) | Len(s)
156 | CharIndex | Sql.CharIndex(a, s) | InStr(1, s, a, 1)
157 | CharIndex | Sql.CharIndex(a, s, b) | InStr(b, s, a, 1)
158 | Substring | Sql.Substring(s, a, b) | Mid(s, a, b)
159 | Substring | Sql.Left(s, a) | Left(s, a)
160 | Substring | Sql.Right(s, a) | Right(s, a)
161 | Stuff | Sql.Stuff(s, a, b, c) | Substring(s, 1, a-1) + c +<br>Substring(s, a+b, Length(s)-a-b+1))
162 | Space | Sql.Space(a) | Space(a)
163 | Pad | Sql.PadRight(s, a, b) | s + String(a-Len(s), b))
164 | Pad | Sql.PadLeft(s, a, b) | String(a-Len(s), b)) + s
165 | Case | Sql.Lower(s) | LCase(s)
166 | Case | Sql.Upper(s) | UCase(s)