Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some pointers not written as pointers #3

Open
atombender opened this issue Apr 2, 2017 · 0 comments
Open

Some pointers not written as pointers #3

atombender opened this issue Apr 2, 2017 · 0 comments
Assignees
Labels

Comments

@atombender
Copy link
Member

Litter:

Map{
  Expression: expressions.Object{
    Extend: false,
    Expressions: map[string]expressions.Expression{
      "_id": expressions.Attribute{
        Name: "_id",
      },
      "name": expressions.Attribute{
        Name: "name",
      },
      "deeply": expressions.Apply{
        LHS: expressions.Attribute{
          Name: "deeply",
        },
        Expression: expressions.Object{
          Extend: false,
          Expressions: map[string]expressions.Expression{
            "famousFor": expressions.Attribute{
              Name: "famousFor",
            },
          },
        },
      },
    },
  },
  LHS: FetchSource{
    Query: SourceQuery{
      Offset: 0,
      Limit: 100,
      Reverse: false,
      Constraint: expressions.Function{
        Name: "eq",
        Arguments: []expressions.Expression{
          expressions.Attribute{
            Name: "_id",
          },
          "sigourney-weaver",
        },
      },
      IncludeContents: true,
      SortOrders: nil,
    },
  },
}

Spew:

(plans.Map) {
 Expression: (expressions.Object) {
  Extend: (bool) false,
  Expressions: (map[string]expressions.Expression) (len=3) {
   (string) (len=3) "_id": (expressions.Attribute) {
    Name: (string) (len=3) "_id"
   },
   (string) (len=4) "name": (expressions.Attribute) {
    Name: (string) (len=4) "name"
   },
   (string) (len=6) "deeply": (expressions.Apply) {
    LHS: (expressions.Attribute) {
     Name: (string) (len=6) "deeply"
    },
    Expression: (*expressions.Object)(0xc4203eb1d0)({
     Extend: (bool) false,
     Expressions: (map[string]expressions.Expression) (len=1) {
      (string) (len=9) "famousFor": (expressions.Attribute) {
       Name: (string) (len=9) "famousFor"
      }
     }
    })
   }
  }
 },
 LHS: (plans.FetchSource) {
  Query: (plans.SourceQuery) {
   Offset: (int) 0,
   Limit: (*int)(0xc420485dd0)(100),
   Reverse: (bool) false,
   Constraint: (expressions.Function) {
    Name: (string) (len=2) "eq",
    Arguments: ([]expressions.Expression) (len=2 cap=2) {
     (expressions.Attribute) {
      Name: (string) (len=3) "_id"
     },
     (expressions.StringLiteral) (len=16) "sigourney-weaver"
    }
   },
   IncludeContents: (bool) true,
   SortOrders: ([]expressions.SortOrder) <nil>
  }
 }
}

Notice *expressions.Object in Spew, where Litter has only expressions.Object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants