Git Product home page Git Product logo

Comments (5)

sorsaffari avatar sorsaffari commented on August 17, 2024

@haikalpribadi the team had a discussion on this and think this is a critical issue we need to resolve. I'm gonna reopen this for now until we come to a conclusive decision. there was more to the discussion than what's documented here. let's talk about it when you get the chance

from typeql.

lolski avatar lolski commented on August 17, 2024

To clarify what @sorsaffari meant, we should be able to store a string ". The escape character \ should not be stored along with it.

The following snippet should insert " and not \" into the database:

grakn> define name sub attribute, datatype string;
grakn> insert $n isa name; $n "\"";
{$n "\"" isa name;}

This is the behaviour of most databases (eg., Postgres, MySQL) and therefore I think this should be how Grakn behaves as well.

from typeql.

haikalpribadi avatar haikalpribadi commented on August 17, 2024

But why? I'm not sure I understand why you need to store an escaped quote? A string with a quote is not wrong. You can easily write that like this, '"', for example. This is accepted. In different languages, you can provide a string with single quotes ' too. It's just in Java you can only provide strings in double quotes " which means you need to escape your actual double quotes " in the string itself, but this only needs one backslash \ in java, which will be rendered first during the string assignment.

So I'm not following where this is an issue. If the user writes the string like \" then that should be stored as is. @sorsaffari @lolski

from typeql.

flyingsilverfin avatar flyingsilverfin commented on August 17, 2024

The main concern right now is that we aren't actually able to store a string containing " AND ' within a Graql string without a backslach being stored in Grakn as well. We will consider further what the best solution for this problem is.

from typeql.

flyingsilverfin avatar flyingsilverfin commented on August 17, 2024

This is related to and resolved/discussed in #224

from typeql.

Related Issues (20)

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.