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

Update Node.php #13

Closed
wants to merge 1 commit into from
Closed

Conversation

tomswinkels
Copy link
Contributor

Get only one property from the properties

Get only one property from the properties
@stefanak-michal
Copy link
Collaborator

I disagree because structures are exactly by the protocol docs. I'm working with some ideas how to improve use case of them. In one project I added to structure classes __toString magic method and Bolt library is automatically returning each structure as string. And for more structured like Node or Relationship I used JSON.

// -- PackStream/v1/Unpacker.php
$output = $this->unpackSpecificStructure($result, ...$this->structuresLt[$marker]);
if ($result && $output instanceof \Bolt\structures\IStructure)
    return (string)$output;

Also structures are currently without version. It should be part of PackStream/v1. Usually I'm saying to myself, if authors of Neo4j will create new version PackStream, it will be more clear how to implement the structures.

I don't like the idea if somebody has to use third-party classes (ex. Bolt) as main use case. I mean, if I call Bolt to execute query, I don't want to receive some Bolt\structures<Cls>, because it can change to versioned PackStream or new version of PackStream, it can be problematic in future.

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

Successfully merging this pull request may close these issues.

2 participants