Git Product home page Git Product logo

Comments (3)

odino avatar odino commented on August 31, 2024

hey @pulciux, would you be able to reproduce the issue in a test? ? is used to to run sort of prepared statements so that might be the problem

from orientdb-odm.

pulciux avatar pulciux commented on August 31, 2024

No, I'm not.
I've run the test suite with phpunit and everything seems all right.
409 tests, 0 failures, 0 errors.

Nevertheless running the following script:

<?php

use Doctrine\OrientDB\Binding\HttpBinding;
use Doctrine\OrientDB\Binding\BindingParameters;
use Doctrine\OrientDB\Binding\Client\Http\CurlClient;

require 'orientdb-odm/vendor/autoload.php';

$parameters = new BindingParameters('localhost',2480,'admin','admin','GratefulDeadConcerts');
$gdb = new HttpBinding($parameters);

try {
    echo "T0: delete vertexes".PHP_EOL;
    $res=$gdb->command("delete from V where name = 'question mark test'");
    var_dump($res->getResult());
} catch (Exception $e) {
    var_dump($e->getMessage());
}

try {
    echo "T1: create vertex - question mark as char".PHP_EOL;
    $res=$gdb->command("create vertex V set name = 'question mark test', url = 'http://www.example.com/?name=question%20mark'");
    var_dump($res->getResult());
} catch (Exception $e) {
    var_dump($e->getMessage());
} 

try {
    echo "T2: create vertex - question mark as unicode escaped sequence".PHP_EOL;
    $res=$gdb->command("create vertex V set name = 'question mark test', url = 'http://www.example.com/\u003Fname=question%20mark'");
    var_dump($res->getResult());
} catch (Exception $e) {
    var_dump($e->getMessage());
}

try {
    echo "T3: select from V - question mark as char".PHP_EOL;
    $res=$gdb->query("select from V where url = 'http://www.example.com/?name=question%20mark'");
    var_dump($res->getResult());
} catch (Exception $e) {
    var_dump($e->getMessage());
}

try {
    echo "T4: select from V - question mark as unicode escaped sequence".PHP_EOL;
    $res=$gdb->query("select from V where url = 'http://www.example.com/\u003Fname=question%20mark'");
    var_dump($res->getResult());
} catch (Exception $e) {
    var_dump($e->getMessage());
}

I've got

T0: delete vertexes
array(1) {
  [0] =>
  class stdClass#9 (3) {
    public $@type =>
    string(1) "d"
    public $@version =>
    int(0)
    public $value =>
    int(1)
  }
}
T1: create vertex - question mark as char
string(83) "java.lang.IllegalStateException: Missing closed string character: ''', position: 79"
T2: create vertex - question mark as unicode escaped sequence
array(1) {
  [0] =>
  class stdClass#12 (6) {
    public $@type =>
    string(1) "d"
    public $@rid =>
    string(6) "#9:813"
    public $@version =>
    int(5)
    public $@class =>
    string(1) "V"
    public $name =>
    string(18) "question mark test"
    public $url =>
    string(44) "http://www.example.com/?name=question%20mark"
  }
}
T3: select from V - question mark as char
string(226) "com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query
Query:  url = 'http://www.example.com/
------^
--> java.lang.IllegalStateException: Missing closed string character: ''', position: 31"
T4: select from V - question mark as unicode escaped sequence
array(1) {
  [0] =>
  class stdClass#6 (6) {
    public $@type =>
    string(1) "d"
    public $@rid =>
    string(6) "#9:813"
    public $@version =>
    int(5)
    public $@class =>
    string(1) "V"
    public $url =>
    string(44) "http://www.example.com/?name=question%20mark"
    public $name =>
    string(18) "question mark test"
  }
}

I've tried with orientDB 1.7.9 and back to 1.7.8
I will even try with 2.0M2

from orientdb-odm.

odino avatar odino commented on August 31, 2024

could you add the failing test case to the test suite? Im happy to look into it if you could add an initial failing test

from orientdb-odm.

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.