예제 #1
0
        public void Visit(ConditionClause component)
        {
            sql.Append("(");
            component.Condition.Accept(this);

            foreach (var condition in component.OtherConditions)
            {
                condition.Accept(this);
            }
            sql.Append(")");
        }
예제 #2
0
        public Risk SelectById(int riskId)
        {
            SelectStatement statement = QueryFactory.Select() as SelectStatement;

            AttributesSupport attributesSupport = new AttributesSupport();
            string            tableName         = attributesSupport.DataDescriptionDatabaseTable(typeof(Risk));

            var             id = attributesSupport.DataDescriptionDatabaseColumn(typeof(Risk), "Id");
            ConditionClause c1 = new ConditionClause
            {
                ColumnName = id,
                Values     = new object[] { riskId },
                Operator   = Dictionaries.ComparisonOperators.EqualTo
            };

            var where = new (Dictionaries.LogicOperators?, bool, ConditionClause)[] { (null, false, c1) };
예제 #3
0
        public UserProject[] SelectAllByAppUser(AppUser user)
        {
            SelectStatement statement = QueryFactory.Select() as SelectStatement;

            AttributesSupport attributesSupport = new AttributesSupport();
            string            tableName         = attributesSupport.DataDescriptionDatabaseTable(typeof(UserProject));

            var             userDbName = attributesSupport.DataDescriptionDatabaseColumn(typeof(UserProject), "AppUser");
            ConditionClause c1         = new ConditionClause
            {
                ColumnName = userDbName,
                Values     = new object[] { user.Id },
                Operator   = Dictionaries.ComparisonOperators.EqualTo
            };

            var where = new (Dictionaries.LogicOperators?, bool, ConditionClause)[] { (null, false, c1) };
예제 #4
0
        public AppUser SelectByLogin(string userLogin)
        {
            SelectStatement statement = QueryFactory.Select() as SelectStatement;

            AttributesSupport attributesSupport = new AttributesSupport();
            string            tableName         = attributesSupport.DataDescriptionDatabaseTable(typeof(AppUser));

            var             login = attributesSupport.DataDescriptionDatabaseColumn(typeof(AppUser), "Login");
            ConditionClause c1    = new ConditionClause
            {
                ColumnName = login,
                Values     = new object[] { userLogin },
                Operator   = Dictionaries.ComparisonOperators.EqualTo
            };

            var where = new (Dictionaries.LogicOperators?, bool, ConditionClause)[] { (null, false, c1) };
예제 #5
0
 public void Visit(ConditionClause component)
 {
     throw new NotImplementedException();
 }