Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Create String() method on Node Interface #95

Closed
ajnavarro opened this issue Mar 13, 2018 · 0 comments
Closed

Create String() method on Node Interface #95

ajnavarro opened this issue Mar 13, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ajnavarro
Copy link
Contributor

Create a String() method on Node interface to be able to print an entire tree. This can be really useful when something fails and we throw an error, or for debugging.

Expression has a Name() method that should be changed to String() too.

@ajnavarro ajnavarro added the enhancement New feature or request label Mar 13, 2018
@erizocosmico erizocosmico self-assigned this Mar 15, 2018
erizocosmico added a commit to erizocosmico/go-mysql-server that referenced this issue Mar 15, 2018
Closes src-d#95
Closes src-d#108

- Implements String method on all sql.Nodes.
- Implements String method on all sql.Expressions.
- Remove Name method from sql.Expressions.
- Only leave Name in expressions that will be Nameable.
- Created TreePrinter to print trees with a Node and Children.

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
erizocosmico added a commit to erizocosmico/go-mysql-server that referenced this issue Mar 16, 2018
Closes src-d#95
Closes src-d#108

- Implements String method on all sql.Nodes.
- Implements String method on all sql.Expressions.
- Remove Name method from sql.Expressions.
- Only leave Name in expressions that will be Nameable.
- Created TreePrinter to print trees with a Node and Children.

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
erizocosmico added a commit to erizocosmico/go-mysql-server that referenced this issue Mar 16, 2018
Closes src-d#95
Closes src-d#108

- Implements String method on all sql.Nodes.
- Implements String method on all sql.Expressions.
- Remove Name method from sql.Expressions.
- Only leave Name in expressions that will be Nameable.
- Created TreePrinter to print trees with a Node and Children.

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants