OrientDB StudioでSQLクエリの異常な動作が検出されました(これはRESTプロトコルでも繰り返されます)。Orientdb quote in SQL query
select * from name
結果:
プロパティは、姓と名のテキストフィールドです{
"result": [
{
"@type": "d",
"@rid": "#25:0",
"@version": 1,
"@class": "name",
"surname": "foo surname",
"name": "foo name"
},
{
"@type": "d",
"@rid": "#26:0",
"@version": 1,
"@class": "name",
"surname": "bar surname",
"name": "bar name"
},
{
"@type": "d",
"@rid": "#27:0",
"@version": 1,
"@class": "name",
"surname": "O'brien",
"name": "baz"
}
],
"notification": "Query executed in 0.069 sec. Returned 3 record(s)"
}
私のサーバーバージョンは、私のクラスでは2.2.5
データです。
私はStudioでいくつかのSQLクエリを作成:
select * from name WHERE surname='O\'brien'
結果:良い作品
{
"result": [
{
"@type": "d",
"@rid": "#27:0",
"@version": 1,
"@class": "name",
"surname": "O'brien",
"name": "baz"
}
],
"notification": "Query executed in 0.016 sec. Returned 1 record(s)"
}
を。次へ
select * from name WHERE NOT (surname='O\'brien')
結果:私は予期しない第三の結果が得られた。この場合
{
"result": [
{
"@type": "d",
"@rid": "#25:0",
"@version": 1,
"@class": "name",
"surname": "foo surname",
"name": "foo name"
},
{
"@type": "d",
"@rid": "#26:0",
"@version": 1,
"@class": "name",
"surname": "bar surname",
"name": "bar name"
},
{
"@type": "d",
"@rid": "#27:0",
"@version": 1,
"@class": "name",
"surname": "O'brien",
"name": "baz"
}
],
"notification": "Query executed in 0.015 sec. Returned 3 record(s)"
}
。
次へ:
select * from name WHERE (NOT (surname='bar surname'))
結果:
{
"result": [
{
"@type": "d",
"@rid": "#25:0",
"@version": 1,
"@class": "name",
"surname": "foo surname",
"name": "foo name"
},
{
"@type": "d",
"@rid": "#27:0",
"@version": 1,
"@class": "name",
"surname": "O'brien",
"name": "baz"
}
],
"notification": "Query executed in 0.017 sec. Returned 2 record(s)"
}
は正常に見えます。
次へ:
select * from name WHERE (NOT (surname='O\'brien'))
結果:
java.lang.NullPointerException
次へ:
select * from name WHERE (surname='O\'brien')
結果:
Empty result
私の質問 - バグか、何か間違っていますか?
これらのクエリはクエリビルダーの一部であるため、OrientDBの括弧の働きを理解する必要があります。
ありがとうございました。
は、あなたが最新バージョンでそれを試すことができますか?それが持続するならgithubで問題を開くことができます。 –
はい、私は2.2.12-SNAPSHOTのgithubで問題を再現しました - https://github.com/orientechnologies/orientdb/issues/6786 – Montekidlo