SqlCollationMapper class
namespace: Serenity.Data assembly: Serenity.Net.Services
Maps an engine independent SqlCollationSpec to the name of a collation of a database engine.
public static class SqlCollationMapper
Public Members
| name | description |
|---|---|
| const AutoMap | Maps the comparer of the connection, throws if there is no exact match. |
| const AutoMapTolerant | Maps the comparer of the connection, throws only if the culture can't be mapped. |
| const TryAutoMap | Maps the comparer of the connection, uses no collation if there is no exact match. |
| const TryAutoMapTolerant | Maps the comparer of the connection, uses no collation only if the culture can't be mapped. |
| static IsAutoMap(…) | Returns true if the value is one of the automap keywords, which can be used as a collation setting of a connection. |
| static Map(…) | Maps the specified comparison to a collation name. |
| static ResolveAutoMap(…) | Maps the specified comparer specification according to an automap keyword. |
| static TryMap(…) | Tries to map the specified comparison to a collation name. |
Remarks
A culture without a collation never has a fallback. With tolerant mapping, a collation that only differs in case or accent sensitivity can be used, when the engine has no exact match. Names are returned as is, so callers should quote them where the engine requires it, e.g. for Postgres.
See Also
- Source: SqlCollationMapper.cs