Skip to content

Better Support for Parent/Child Records #378

Description

@jonwagner

See if we can automatically handle deserializing the common query pattern of:

SELECT parent.*, child.*
FROM parent JOIN child

Example from Issue #375:

class Beer
{
	public int ID;
	public IList<Glass> Glasses;
}

CREATE PROC GetBeerAndPossibleGlasses AS
	SELECT * FROM Beer
	SELECT b.BeerID, g.* FROM Beer JOIN Glasses ON (...)
while most SQL are written like

   SELECT * FROM Beer LEFT JOIN Glasses ON (...)

I'm thinking that we create a new record reader:

  • Keep a dictionary of parentid/parent.
  • Read a record.
  • Look up the parentid and see if we need to create a new instance or reuse an existing.
  • Add child to the parent using the parent/child relationship.

This will probably stream acceptably.

This project will require:

  • New record reader
  • Record reader Test cases
  • Possible adjustment to the Recordset attributes for interface building
  • Update the interface builder to use the new record reader
  • Interface test cases
  • Update documentation / samples

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions