mirror of
https://github.com/awatertrevi/xamarin-neo4j.git
synced 2026-09-22 09:05:29 +00:00
Small fix
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
|
// Runtime Version:4.0.30319.42000
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace Xamarin.Neo4j.Tests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestWithReturnAll()
|
public void TestWithLabeledAndAliasedReturnAll()
|
||||||
{
|
{
|
||||||
const string query = "MATCH (t:Tender)-[:LAST]->(z) RETURN *";
|
const string query = "MATCH (t:Tender)-[:LAST]->(z) RETURN *";
|
||||||
const string expected = "MATCH (t:Tender)-[display_variable_1:LAST]->(z) RETURN *";
|
const string expected = "MATCH (t:Tender)-[display_variable_1:LAST]->(z) RETURN *";
|
||||||
@@ -49,6 +49,28 @@ namespace Xamarin.Neo4j.Tests
|
|||||||
Assert.AreEqual(expected, actual);
|
Assert.AreEqual(expected, actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestWithUnlabeledReturnAll()
|
||||||
|
{
|
||||||
|
const string query = "MATCH (t:Tender)-[]->(z) RETURN *";
|
||||||
|
const string expected = "MATCH (t:Tender)-[display_variable_1]->(z) RETURN *";
|
||||||
|
|
||||||
|
var actual = QueryHelper.ToDisplayQuery(query);
|
||||||
|
|
||||||
|
Assert.AreEqual(expected, actual);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestWithLabeledAndAliasedReturnAllWithMultipleRelationships()
|
||||||
|
{
|
||||||
|
const string query = "MATCH (t:Tender)-[:LAST]->(z)-[:NEXT]->(x) RETURN *";
|
||||||
|
const string expected = "MATCH (t:Tender)-[display_variable_1:LAST]->(z)-[display_variable_2:NEXT]->(x) RETURN *";
|
||||||
|
|
||||||
|
var actual = QueryHelper.ToDisplayQuery(query);
|
||||||
|
|
||||||
|
Assert.AreEqual(expected, actual);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestWithNoReturn()
|
public void TestWithNoReturn()
|
||||||
{
|
{
|
||||||
@@ -95,5 +117,7 @@ namespace Xamarin.Neo4j.Tests
|
|||||||
|
|
||||||
Assert.AreEqual(expected, actual);
|
Assert.AreEqual(expected, actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,8 @@ namespace Xamarin.Neo4j.iOS.CustomRenderers
|
|||||||
toolbar.Items = keyButtons;
|
toolbar.Items = keyButtons;
|
||||||
|
|
||||||
Control.InputAccessoryView = toolbar;
|
Control.InputAccessoryView = toolbar;
|
||||||
|
|
||||||
|
HighlightWords(_keyWords);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>nl.resoftware.pocketgraph</string>
|
<string>nl.resoftware.pocketgraph</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>4</string>
|
<string>5</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.1.0</string>
|
<string>1.1.0</string>
|
||||||
<key>UILaunchStoryboardName</key>
|
<key>UILaunchStoryboardName</key>
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ namespace Xamarin.Neo4j.Utilities
|
|||||||
var returnIndex = transformedQuery.LastIndexOf("RETURN ", StringComparison.OrdinalIgnoreCase);
|
var returnIndex = transformedQuery.LastIndexOf("RETURN ", StringComparison.OrdinalIgnoreCase);
|
||||||
var returnClause = transformedQuery.Substring(returnIndex + "RETURN ".Length);
|
var returnClause = transformedQuery.Substring(returnIndex + "RETURN ".Length);
|
||||||
|
|
||||||
if (returnClause.Trim() != "*")
|
if (!returnClause.Trim().StartsWith("*"))
|
||||||
{
|
{
|
||||||
var newReturnClause = returnClause;
|
var newReturnClause = returnClause;
|
||||||
foreach (var rel in relationships)
|
foreach (var rel in relationships)
|
||||||
|
|||||||
Reference in New Issue
Block a user