// Constructor

        /// <inheritdoc/>
        public SqlParameterNameProvider(SqlCompilerConfiguration configuration)
        {
            NameTable = new Dictionary <object, string>();
            prefix    = string.IsNullOrEmpty(configuration.ParameterNamePrefix)
        ? DefaultPrefix
        : configuration.ParameterNamePrefix;
        }
Esempio n. 2
0
        // Constructor

        internal SqlCompilerContext(SqlCompilerConfiguration configuration)
        {
            NamingOptions = SqlCompilerNamingOptions.TableQualifiedColumns | SqlCompilerNamingOptions.TableAliasing;
            if (configuration.DatabaseQualifiedObjects)
            {
                NamingOptions |= SqlCompilerNamingOptions.DatabaseQualifiedObjects;
            }

            TableNameProvider     = new SqlTableNameProvider(this);
            ParameterNameProvider = new SqlParameterNameProvider(configuration);
            traversalStack        = new Stack <SqlNode>();
            traversalTable        = new HashSet <SqlNode>();
            Output            = new ContainerNode();
            SqlNodeActualizer = new SqlNodeActualizer(configuration.DatabaseMapping, configuration.SchemaMapping);
        }