Giter Site home page Giter Site logo

cypher's People

Contributors

bruth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cypher's Issues

Implement remaining keywords

  • REMOVE
  • FOREACH
  • CREATE UNIQUE
  • CREATE INDEX ON
  • USING INDEX
  • DROP INDEX ON
  • CREATE CONSTRAINT ON ... ASSERT ... IS UNIQUE
  • DROP CONSTRAINT ON ... ASSERT ... IS UNIQUE
  • CASE ... WHEN/ELSE .. END

Issue using relationship methods

Python 2.7.5 (default, Aug 25 2013, 00:04:04) 
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from cypher import *
>>> Node(identifier='http://www.example.com/location.xhtml?locationId=1373')
(`http://www.example.com/location.xhtml?locationId=1373`)
>>> Rel(Node(identifier='http://www.example.com/location.xhtml?locationId=1373'), Node(identifier='http://www.example.com/about.xhtml'), 'LINKSTO', identifier='linksto')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/techdragon/.virtualenvs/crawl/src/cypher/cypher/token.py", line 23, in __repr__
    return str(self)
  File "/Users/techdragon/.virtualenvs/crawl/src/cypher/cypher/token.py", line 12, in __str__
    return ''.join([str(t) for t in self.tokenize()])
  File "/Users/techdragon/.virtualenvs/crawl/src/cypher/cypher/syntax.py", line 250, in tokenize
    elif self.type.startswith('*'):
AttributeError: 'Node' object has no attribute 'startswith'
>>> page1 = Node(identifier='http://www.example.com/location.xhtml?locationId=1373')
>>> page2 = Node(identifier='http://www.example.com/about.xhtml')
>>> Rel(page1, page2, 'LINKSTO' identifier='linksto')
  File "<stdin>", line 1
    Rel(page1, page2, 'LINKSTO' identifier='linksto')
                                         ^
SyntaxError: invalid syntax
>>> Rel(page1, page2, 'LINKSTO' identifier='linksto')
  File "<stdin>", line 1
    Rel(page1, page2, 'LINKSTO' identifier='linksto')
                                         ^
SyntaxError: invalid syntax
>>> Rel(page1, page2, 'LINKSTO', identifier='linksto')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/techdragon/.virtualenvs/crawl/src/cypher/cypher/token.py", line 23, in __repr__
    return str(self)
  File "/Users/techdragon/.virtualenvs/crawl/src/cypher/cypher/token.py", line 12, in __str__
    return ''.join([str(t) for t in self.tokenize()])
  File "/Users/techdragon/.virtualenvs/crawl/src/cypher/cypher/syntax.py", line 250, in tokenize
    elif self.type.startswith('*'):
AttributeError: 'Node' object has no attribute 'startswith'
>>> 

Im not sure what more to say at this point. If i fix this ill give a pull request, but I only just found this library so not sure if ill be able to work it out before you could, or if Im even using this library right.

P.S. @bruth also, this little library is the exact kind of thing I wish there was more of in python. :) ๐Ÿ‘

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.