File tree Expand file tree Collapse file tree 3 files changed +49
-0
lines changed
Expand file tree Collapse file tree 3 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+
3+ namespace SQLite . CodeFirst
4+ {
5+ /// <summary>
6+ /// When SQLite compares two strings, it uses a collating sequence or collating function (two words for the same thing)
7+ /// to determine which string is greater or if the two strings are equal. SQLite has three built-in collating functions (see <see cref="CollationFunction"/>).
8+ /// </summary>
9+ [ AttributeUsage ( AttributeTargets . Property ) ]
10+ public sealed class CollateAttribute : Attribute
11+ {
12+ public CollateAttribute ( CollationFunction collation = CollationFunction . None )
13+ {
14+ Collation = collation ;
15+ }
16+
17+ public CollationFunction Collation { get ; set ; }
18+ }
19+ }
Original file line number Diff line number Diff line change 1+ namespace SQLite . CodeFirst
2+ {
3+ /// <summary>
4+ /// The collation function to use for this column.
5+ /// Is used together with the <see cref="CollateAttribute" />.
6+ /// </summary>
7+ public enum CollationFunction
8+ {
9+ None ,
10+
11+ /// <summary>
12+ /// Compares string data using memcmp(), regardless of text encoding.
13+ /// </summary>
14+ RTrim ,
15+
16+ /// <summary>
17+ /// The same as binary, except the 26 upper case characters of ASCII are folded to their lower case equivalents before
18+ /// the comparison is performed. Note that only ASCII characters are case folded. SQLite does not attempt to do full
19+ /// UTF case folding due to the size of the tables required.
20+ /// </summary>
21+ NoCase ,
22+
23+ /// <summary>
24+ /// The same as binary, except that trailing space characters are ignored.
25+ /// </summary>
26+ Binary
27+ }
28+ }
Original file line number Diff line number Diff line change 8383 <Compile Include =" ..\Shared\AssemblySharedInfo.cs" >
8484 <Link >Properties\AssemblySharedInfo.cs</Link >
8585 </Compile >
86+ <Compile Include =" Attributes\CollateAttribute.cs" />
87+ <Compile Include =" Attributes\CollationFunction.cs" />
8688 <Compile Include =" Attributes\OnConflictAction.cs" />
8789 <Compile Include =" Attributes\UniqueAttribute.cs" />
8890 <Compile Include =" Entities\IHistory.cs" />
You can’t perform that action at this time.
0 commit comments