/// <summary>
        ///     Fills the specified item.
        /// </summary>
        static void Fill(CustomSqlInfoResult item)
        {
            item.NameInDotnet = item.Name.ToContractName();

            item.DataTypeInDotnet = GetDataTypeInDotnet(item.DataType, item.IsNullable);

            if (item.Name.EndsWith("_FLAG", StringComparison.OrdinalIgnoreCase))
            {
                var sqlDataTypeIsChar = item.DataType.EndsWith("char", StringComparison.OrdinalIgnoreCase);
                if (!sqlDataTypeIsChar)
                {
                    throw new InvalidOperationException($"{item.Name} column should be char.");
                }

                item.DataTypeInDotnet = DotNetTypeName.DotNetBool;
                item.SqlReaderMethod  = SqlReaderMethods.GetBooleanValue;
                if (item.IsNullable)
                {
                    item.DataTypeInDotnet = DotNetTypeName.GetDotNetNullableType(DotNetTypeName.DotNetBool);
                    item.SqlReaderMethod  = SqlReaderMethods.GetBooleanNullableValueFromChar;
                }
            }
            else
            {
                item.SqlReaderMethod = SqlDbTypeMap.GetSqlReaderMethod(item.DataType.ToUpperEN(), item.IsNullable);
            }
        }
        /// <summary>
        ///     Reads the input parameters.
        /// </summary>
        IReadOnlyList <CustomSqlInfoParameter> ReadInputParameters()
        {
            var list = DatabaseReader.ReadInputParametersFromDatabase();

            return(list.ToList().ConvertAll(x =>
            {
                var name = x.Name;
                var dataType = x.DataType;
                var isNullable = x.IsNullable;

                var cSharpPropertyTypeName = GetDataTypeInDotnet(dataType, isNullable);

                var cSharpPropertyName = name.ToContractName();

                var valueAccessPathForAddInParameter = cSharpPropertyName;

                var sqlDbTypeName = GetSqlDbTypeName(dataType);

                var isChar = sqlDbTypeName == SqlDbType.Char;

                var endsWithFlagSuffix = name.EndsWith("_FLAG", StringComparison.OrdinalIgnoreCase);
                if (endsWithFlagSuffix && isChar)
                {
                    if (isNullable)
                    {
                        cSharpPropertyTypeName = DotNetTypeName.GetDotNetNullableType(DotNetTypeName.DotNetBool);
                        valueAccessPathForAddInParameter = valueAccessPathForAddInParameter + ".GetCharNullableValueFromBoolean()";
                    }
                    else
                    {
                        cSharpPropertyTypeName = DotNetTypeName.DotNetBool;
                        valueAccessPathForAddInParameter = valueAccessPathForAddInParameter + ".GetCharValueFromBoolean()";
                    }
                }

                return new CustomSqlInfoParameter
                {
                    Name = name,
                    IsNullable = isNullable,
                    CSharpPropertyName = cSharpPropertyName,
                    CSharpPropertyTypeName = cSharpPropertyTypeName,
                    SqlDbTypeName = sqlDbTypeName,
                    ValueAccessPathForAddInParameter = valueAccessPathForAddInParameter,
                    IsStructured = sqlDbTypeName == SqlDbType.Structured,
                    StructuredTypeName = x.DataType
                };
            }));
        }
        static IColumnInfo ReEvaluate(IColumnInfo columnInfo)
        {
            var item = ColumnInfo.CreateFrom(columnInfo);



            if (item.ColumnName.EndsWith("_FLAG", StringComparison.OrdinalIgnoreCase))
            {
                if (item.IsNullable)
                {
                    item.DotNetType      = DotNetTypeName.GetDotNetNullableType(DotNetTypeName.DotNetBool);
                    item.SqlReaderMethod = SqlReaderMethods.GetBooleanNullableValueFromChar;
                }
                else
                {
                    item.DotNetType      = DotNetTypeName.DotNetBool;
                    item.SqlReaderMethod = SqlReaderMethods.GetBooleanValueFromChar;
                }
            }

            return(item);
        }