Link Search Menu Expand Document

FirebirdDbTypeNameToClientTypeResolver


This IResolver<string, Type> implementation converts a Firebird column type name into its equivalent .NET CLR type (e.g. varchar/char/blob_textstring, numeric/decimal/dec16/dec34decimal, blob_binary/binary/varbinarybyte[]). It is the default DbTypeResolver used by FirebirdDbHelper.

The names resolved here are the canonical, lowercased type-name strings produced by FirebirdDbHelper out of Firebird’s RDB$FIELD_TYPE/RDB$FIELD_SUB_TYPE/RDB$CHARACTER_SET_ID codes — they are not Firebird SQL keywords themselves, and this resolver is not meaningful to call with an arbitrary SQL type name.

Usability

var resolver = new FirebirdDbTypeNameToClientTypeResolver();
var clrType = resolver.Resolve("varchar"); // typeof(string)