Exemplo n.º 1
0
 /// <summary>
 /// 初始化From子句
 /// </summary>
 /// <param name="dialect">方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体别名注册器</param>
 /// <param name="table">表</param>
 public FromClause(IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register, SqlItem table = null)
 {
     Dialect  = dialect;
     Resolver = resolver;
     Register = register;
     Table    = table;
 }
Exemplo n.º 2
0
 /// <summary>
 /// 初始化一个<see cref="OrderByClause"/>类型的实例
 /// </summary>
 /// <param name="dialect">Sql方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体别名注册器</param>
 public OrderByClause(IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register)
 {
     _items    = new List <OrderByItem>();
     _dialect  = dialect;
     _resolver = resolver;
     _register = register;
 }
Exemplo n.º 3
0
 /// <summary>
 ///     初始化分组子句
 /// </summary>
 /// <param name="dialect">Sql方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体别名注册器</param>
 public GroupByClause(IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register)
 {
     _dialect  = dialect;
     _resolver = resolver;
     _register = register;
     _group    = new List <SqlItem>();
 }
Exemplo n.º 4
0
 ///<inheritdoc cref="IDeploymentRepository"/>
 public DeploymentRepository(IDbContextFactory contextFactory, IClock clock,
                             IEntityResolver <DeploymentTarget> deploymentTargetResolver)
 {
     this.contextFactory           = contextFactory;
     this.clock                    = clock;
     this.deploymentTargetResolver = deploymentTargetResolver;
 }
 public LandscapeGenerator(
     IEntityResolver entityResolver,
     IMap map)
 {
     _entityResolver = entityResolver;
     _map            = map;
 }
Exemplo n.º 6
0
 /// <summary>
 /// 初始化一个<see cref="FromClause"/>类型的实例
 /// </summary>
 /// <param name="builder">Sql生成器</param>
 /// <param name="dialect">Sql方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体别名注册器</param>
 public FromClause(ISqlBuilder builder, IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register)
 {
     Builder  = builder;
     Dialect  = dialect;
     Resolver = resolver;
     Register = register;
 }
Exemplo n.º 7
0
 /// <summary>
 /// 初始化一个<see cref="FromClause"/>类型的实例
 /// </summary>
 /// <param name="fromClause">From子句</param>
 protected FromClause(FromClause fromClause)
 {
     Dialect  = fromClause.Dialect;
     Resolver = fromClause.Resolver;
     Register = fromClause.Register;
     Table    = fromClause.Table.Clone();
 }
Exemplo n.º 8
0
 /// <summary>
 ///     初始化Where子句
 /// </summary>
 /// <param name="dialect">方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体别名注册器</param>
 /// <param name="parameterManager">参数管理器</param>
 public WhereClause(IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register,
                    IParameterManager parameterManager)
 {
     _resolver           = resolver;
     _helper             = new Helper(dialect, resolver, register, parameterManager);
     _expressionResolver = new PredicateExpressionResolver(dialect, resolver, register, parameterManager);
 }
Exemplo n.º 9
0
 /// <summary>
 /// 初始化一个<see cref="OrderByClause"/>类型的实例
 /// </summary>
 /// <param name="orderByClause">Order By子句</param>
 /// <param name="register">实体别名注册器</param>
 protected OrderByClause(OrderByClause orderByClause, IEntityAliasRegister register)
 {
     _dialect  = orderByClause._dialect;
     _resolver = orderByClause._resolver;
     _register = register;
     _items    = new List <OrderByItem>(orderByClause._items);
 }
Exemplo n.º 10
0
 /// <summary>
 ///     初始化表连接子句
 /// </summary>
 /// <param name="dialect">方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体注册器</param>
 public JoinClause(IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register)
 {
     _params   = new List <JoinItem>();
     _dialect  = dialect;
     _resolver = resolver;
     _register = register;
 }
Exemplo n.º 11
0
 /// <summary>
 /// 初始化排序子句
 /// </summary>
 /// <param name="dialect">Sql方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体别名注册器</param>
 /// <param name="items">排序项列表</param>
 public OrderByClause(IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register, List <OrderByItem> items = null)
 {
     _dialect  = dialect;
     _resolver = resolver;
     _register = register;
     _items    = items ?? new List <OrderByItem>();
 }
Exemplo n.º 12
0
 /// <summary>
 /// 初始化Select子句
 /// </summary>
 /// <param name="sqlBuilder">Sql生成器</param>
 /// <param name="dialect">方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体注册器</param>
 /// <param name="columns">列名集合</param>
 public SelectClause( ISqlBuilder sqlBuilder, IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register, List<ColumnCollection> columns = null ) {
     _sqlBuilder = sqlBuilder;
     _dialect = dialect;
     _resolver = resolver;
     _register = register;
     _columns = columns ?? new List<ColumnCollection>();
 }
Exemplo n.º 13
0
 /// <summary>
 ///     初始化Select子句
 /// </summary>
 /// <param name="dialect">方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体注册器</param>
 public SelectClause(IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register)
 {
     _columns  = new List <ColumnCollection>();
     _dialect  = dialect;
     _resolver = resolver;
     _register = register;
 }
Exemplo n.º 14
0
 /// <summary>
 /// 初始化Sql生成器辅助操作
 /// </summary>
 /// <param name="dialect">方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体别名注册器</param>
 /// <param name="parameterManager">参数管理器</param>
 public Helper(IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register, IParameterManager parameterManager)
 {
     _dialect          = dialect;
     _resolver         = resolver;
     _register         = register;
     _parameterManager = parameterManager;
 }
Exemplo n.º 15
0
 private FakeStorageTableOperation(string retrievePartitionKey, string retrieveRowKey,
                                   IEntityResolver retrieveEntityResolver)
 {
     _operationType          = TableOperationType.Retrieve;
     _retrievePartitionKey   = retrievePartitionKey;
     _retrieveRowKey         = retrieveRowKey;
     _retrieveEntityResolver = retrieveEntityResolver;
 }
Exemplo n.º 16
0
 /// <summary>
 /// 初始化一个<see cref="JoinClause"/>类型的实例
 /// </summary>
 /// <param name="joinClause">Join子句</param>
 /// <param name="sqlBuilder">Sql生成器</param>
 /// <param name="register">实体别名注册器</param>
 protected JoinClause(JoinClause joinClause, ISqlBuilder sqlBuilder, IEntityAliasRegister register)
 {
     _sqlBuilder = sqlBuilder;
     _dialect    = joinClause._dialect;
     _resolver   = joinClause._resolver;
     _register   = register;
     _params     = joinClause._params.Select(t => t.Clone()).ToList();
 }
Exemplo n.º 17
0
 /// <summary>
 /// 初始化Where子句
 /// </summary>
 /// <param name="dialect">方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体别名注册器</param>
 /// <param name="parameterManager">参数管理器</param>
 /// <param name="condition">查询条件</param>
 public WhereClause(IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register, IParameterManager parameterManager, ICondition condition = null)
 {
     _dialect            = dialect;
     _resolver           = resolver;
     _condition          = condition;
     _helper             = new Helper(dialect, resolver, register, parameterManager);
     _expressionResolver = new PredicateExpressionResolver(dialect, resolver, register, parameterManager);
 }
Exemplo n.º 18
0
 ///<inheritdoc cref="IDataRepository"/>
 public DataRepository(IDbContextFactory contextFactory,
                       IEntityResolver <Data> dataResolver,
                       IDataCalculator dataCalculator)
 {
     this.contextFactory = contextFactory;
     this.dataResolver   = dataResolver;
     this.dataCalculator = dataCalculator;
 }
Exemplo n.º 19
0
 /// <summary>
 /// 初始化一个<see cref="GroupByClause"/>类型的实例
 /// </summary>
 /// <param name="groupByClause">Group By子句</param>
 /// <param name="register">实体别名注册器</param>
 protected GroupByClause(GroupByClause groupByClause, IEntityAliasRegister register)
 {
     _dialect  = groupByClause._dialect;
     _resolver = groupByClause._resolver;
     _register = register;
     _group    = new List <SqlItem>(_group);
     _having   = groupByClause._having;
 }
Exemplo n.º 20
0
 /// <summary>
 /// 初始化分组子句
 /// </summary>
 /// <param name="dialect">Sql方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体别名注册器</param>
 /// <param name="group">分组字段</param>
 /// <param name="having">分组条件</param>
 public GroupByClause(IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register, List <SqlItem> group = null, string having = null)
 {
     _dialect  = dialect;
     _resolver = resolver;
     _register = register;
     _group    = group ?? new List <SqlItem>();
     _having   = having;
 }
Exemplo n.º 21
0
 /// <summary>
 /// 初始化一个<see cref="SelectClause"/>类型的实例
 /// </summary>
 /// <param name="selectClause">Select子句</param>
 /// <param name="sqlBuilder">Sql生成器</param>
 /// <param name="register">实体别名生成器</param>
 protected SelectClause(SelectClause selectClause, ISqlBuilder sqlBuilder, IEntityAliasRegister register)
 {
     _sqlBuilder = sqlBuilder;
     _register   = register;
     _dialect    = selectClause._dialect;
     _resolver   = selectClause._resolver;
     _columns    = new List <ColumnCollection>(selectClause._columns);
 }
Exemplo n.º 22
0
 /// <summary>
 /// 初始化表连接子句
 /// </summary>
 /// <param name="sqlBuilder">Sql生成器</param>
 /// <param name="dialect">方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体注册器</param>
 /// <param name="joinItems">连接参数列表</param>
 public JoinClause(ISqlBuilder sqlBuilder, IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register, List <JoinItem> joinItems = null)
 {
     _sqlBuilder = sqlBuilder;
     _dialect    = dialect;
     _resolver   = resolver;
     _register   = register;
     _params     = joinItems ?? new List <JoinItem>();
 }
Exemplo n.º 23
0
 /// <summary>
 /// 初始化From子句
 /// </summary>
 /// <param name="dialect">方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体别名注册器</param>
 /// <param name="parameterManager">参数管理器</param>
 /// <param name="tag">参数标识</param>
 public WhereClause(IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register, IParameterManager parameterManager, string tag = null)
 {
     _dialect          = dialect;
     _resolver         = resolver;
     _register         = register;
     _parameterManager = parameterManager;
     _tag        = tag;
     _paramIndex = 0;
 }
Exemplo n.º 24
0
 /// <summary>
 /// 初始化一个<see cref="FromClause"/>类型的实例
 /// </summary>
 /// <param name="builder">Sql生成器</param>
 /// <param name="dialect">Sql方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体别名注册器</param>
 /// <param name="tableDatabase">表数据库</param>
 /// <param name="table">表</param>
 public FromClause(ISqlBuilder builder, IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register, ITableDatabase tableDatabase, SqlItem table = null)
 {
     Builder       = builder;
     Dialect       = dialect;
     Resolver      = resolver;
     Register      = register;
     TableDatabase = tableDatabase;
     Table         = table;
 }
Exemplo n.º 25
0
 /// <summary>
 ///   Constructs a SAX Parser.
 /// </summary>
 public SAXDriver()
 {
     _entityResolver = _base;
     _contentHandler = _base;
     _dtdHandler     = _base;
     _errorHandler   = _base;
     _declHandler    = _base;
     _lexicalHandler = _base;
 }
Exemplo n.º 26
0
 public LocationArmyCountInfoBuilder(
     IEngine engine,
     IEntityResolver entityResolver,
     IArmyQueryService armyQueryService,
     IMapQueryService mapQueryService) : base(engine, entityResolver)
 {
     _armyQueryService = armyQueryService;
     _mapQueryService  = mapQueryService;
 }
Exemplo n.º 27
0
 /// <summary>
 /// 初始化一个<see cref="JoinClause"/>类型的实例
 /// </summary>
 /// <param name="sqlBuilder">Sql生成器</param>
 /// <param name="dialect">Sql方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体别名注册器</param>
 /// <param name="parameterManager">参数管理器</param>
 /// <param name="tableDatabase">表数据库</param>
 public SqliteJoinClause(ISqlBuilder sqlBuilder
                         , IDialect dialect
                         , IEntityResolver resolver
                         , IEntityAliasRegister register
                         , IParameterManager parameterManager
                         , ITableDatabase tableDatabase)
     : base(sqlBuilder, dialect, resolver, register, parameterManager, tableDatabase)
 {
 }
Exemplo n.º 28
0
 /// <summary>
 /// 初始化一个<see cref="FromClause"/>类型的实例
 /// </summary>
 /// <param name="builder">Sql生成器</param>
 /// <param name="dialect">Sql方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体别名注册器</param>
 /// <param name="tableDatabase">表数据库</param>
 /// <param name="table">表</param>
 public SqliteFromClause(ISqlBuilder builder
                         , IDialect dialect
                         , IEntityResolver resolver
                         , IEntityAliasRegister register
                         , ITableDatabase tableDatabase
                         , SqlItem table = null)
     : base(builder, dialect, resolver, register, tableDatabase, table)
 {
 }
Exemplo n.º 29
0
 ///<inheritdoc cref="IRunRepository"/>
 public RunRepository(IDbContextFactory contextFactory, IClock clock,
                      IEntityResolver <Run> runResolver,
                      IEntityResolver <RegisteredModel> registeredModelResolver)
 {
     this.contextFactory          = contextFactory;
     this.clock                   = clock;
     this.runResolver             = runResolver;
     this.registeredModelResolver = registeredModelResolver;
 }
Exemplo n.º 30
0
 /// <summary>
 /// 初始化delete子句
 /// </summary>
 /// <param name="dialect">方言</param>
 /// <param name="resolver">实体解析器</param>
 /// <param name="register">实体别名注册器</param>
 public ValuesClause(IDialect dialect, IEntityResolver resolver, IEntityAliasRegister register, IParameterManager parameterManager)
 {
     _columns          = new Dictionary <string, string>();
     _dialect          = dialect;
     _resolver         = resolver;
     _register         = register;
     _parameterManager = parameterManager;
     _helper           = new Helper(dialect, resolver, register, parameterManager);
 }
Exemplo n.º 31
0
		public ThemaFactory(
			IThemaLoader loader = null,
			IRoleResolver roleresolver = null,
			IFileNameResolver fileresolver = null,
			ITypeLocator locator = null,
			IEntityResolver entityResolver = null,
			ILogListener log = null,
			IPeriodProvider periodprovider = null) {
			Themas = new ThemaCollection {Factory = this};
			RoleResolver = roleresolver ?? QWebServiceRegistry.Default.RoleResolver;
			FileResolver = fileresolver ?? QWebServiceRegistry.Default.FileNameResolver;
			TypeLocator = locator ?? QWebServiceRegistry.Default.TypeLocator;
			PeriodProvider = periodprovider ?? TypeLocator.Get<IPeriodProvider>().create<IPeriodProvider>();
			EntityResolver = entityResolver ?? TypeLocator.Get<IEntityResolver>().create<IEntityResolver>();
			Sources = new List<IThemaSource>();
			Log = log ?? QWebServiceRegistry.Default.Log;
			Loader = loader ?? new Loader(this);
		}
Exemplo n.º 32
0
 /// <summary>
 ///   Constructs a SAX Parser.
 /// </summary>
 public SAXDriver() {
   _entityResolver = _base;
   _contentHandler = _base;
   _dtdHandler = _base;
   _errorHandler = _base;
   _declHandler = _base;
   _lexicalHandler = _base;
 }
Exemplo n.º 33
0
 /// <summary>
 ///   Creates a new instance of <see cref="Parser" />
 /// </summary>
 public Parser() {
   _newElement = null;
   _contentHandler = this;
   _lexicalHandler = this;
   _dtdHandler = this;
   _errorHandler = this;
   _entityResolver = this;
 }
 public WithInterfaceAndAbstractParameters(IEntityResolver resolver)
 {
 }