Exemplo n.º 1
0
        internal void CreateBasicCellRelation(ViewCellRelation viewCellRelation)
        {
            var slots = GetAllQuerySlots();

            // Create a base cell relation that has all the scalar slots of this
            m_basicCellRelation = new BasicCellRelation(this, viewCellRelation, slots);
        }
Exemplo n.º 2
0
 // effects: Generates the single-cell key+domain constraints for
 // baseRelation and adds them to constraints
 private static void PopulateBaseConstraints(
     BasicCellRelation baseRelation,
     BasicSchemaConstraints constraints)
 {
     // Populate key constraints
     baseRelation.PopulateKeyConstraints(constraints);
 }
Exemplo n.º 3
0
        // effects: Creates the base cell relation and view cell relations
        // for each cellquery/cell. Also generates the C-Side and S-side
        // basic constraints and stores them into cConstraints and
        // sConstraints. Stores them in cConstraints and sConstraints
        private void ConstructCellRelationsWithConstraints(BasicSchemaConstraints cConstraints,
                                                           BasicSchemaConstraints sConstraints)
        {
            // Populate single cell constraints
            int cellNumber = 0;

            foreach (Cell cell in m_cells)
            {
                // We have to create the ViewCellRelation so that the
                // BasicCellRelations can be created.
                cell.CreateViewCellRelation(cellNumber);
                BasicCellRelation cCellRelation = cell.CQuery.BasicCellRelation;
                BasicCellRelation sCellRelation = cell.SQuery.BasicCellRelation;
                // Populate the constraints for the C relation and the S Relation
                PopulateBaseConstraints(cCellRelation, cConstraints);
                PopulateBaseConstraints(sCellRelation, sConstraints);
                cellNumber++;
            }

            // Populate two-cell constraints, i.e., inclusion
            foreach (Cell firstCell in m_cells)
            {
                foreach (Cell secondCell in m_cells)
                {
                    if (Object.ReferenceEquals(firstCell, secondCell))
                    {
                        // We do not want to set up self-inclusion constraints unnecessarily
                        continue;
                    }
                }
            }
        }
Exemplo n.º 4
0
 // <summary>
 // Copy Constructor
 // </summary>
 internal CellQuery(CellQuery source)
 {
     m_basicCellRelation   = source.m_basicCellRelation;
     m_boolExprs           = source.m_boolExprs;
     m_selectDistinct      = source.m_selectDistinct;
     m_extentMemberPath    = source.m_extentMemberPath;
     m_originalWhereClause = source.m_originalWhereClause;
     m_projectedSlots      = source.m_projectedSlots;
     m_whereClause         = source.m_whereClause;
 }
        private void ConstructCellRelationsWithConstraints(
            SchemaConstraints <BasicKeyConstraint> cConstraints,
            SchemaConstraints <BasicKeyConstraint> sConstraints)
        {
            int cellNumber = 0;

            foreach (Cell cell in this.m_cells)
            {
                cell.CreateViewCellRelation(cellNumber);
                BasicCellRelation basicCellRelation1 = cell.CQuery.BasicCellRelation;
                BasicCellRelation basicCellRelation2 = cell.SQuery.BasicCellRelation;
                CellGroupValidator.PopulateBaseConstraints(basicCellRelation1, cConstraints);
                CellGroupValidator.PopulateBaseConstraints(basicCellRelation2, sConstraints);
                ++cellNumber;
            }
            foreach (Cell cell1 in this.m_cells)
            {
                foreach (Cell cell2 in this.m_cells)
                {
                    object.ReferenceEquals((object)cell1, (object)cell2);
                }
            }
        }
 private static void PopulateBaseConstraints(
     BasicCellRelation baseRelation,
     SchemaConstraints <BasicKeyConstraint> constraints)
 {
     baseRelation.PopulateKeyConstraints(constraints);
 }
        internal void CreateBasicCellRelation(ViewCellRelation viewCellRelation)
        {
            List <MemberProjectedSlot> allQuerySlots = this.GetAllQuerySlots();

            this.m_basicCellRelation = new BasicCellRelation(this, viewCellRelation, (IEnumerable <MemberProjectedSlot>)allQuerySlots);
        }