I hereby claim:
- I am cskardon on github.
- I am cskardon (https://keybase.io/cskardon) on keybase.
- I have a public key ASAJ4USySBXduTD99vwlOImo80TpjNQ_2Yzc0g5D1HPCzgo
To claim this, I am signing this object:
-------------------------------------------------------------------------------- | |
-- WORKSHOP BASICS NEO4J | |
-- https://tinyurl.com/workshop-neo4j-basics-ita | |
-------------------------------------------------------------------------------- | |
--------------------------------------------------------------------- CONTRAINTS | |
/// constraint unique on movie title | |
CREATE CONSTRAINT title_uniqueness ON (m:Movie) ASSERT m.title IS UNIQUE; |
$global:folder = 'c:\temp\imports' # The root folder being monitored. | |
$filter = '*.csv' # File types we're looking for. | |
$global:archiveFolder = 'c:\temp\imports\archive' # The archive root folder | |
$global:cypherShellLocation = 'd:\databases\neo4j\enterprise\neo4j-enterprise-3.3.0\bin\cypher-shell.bat' # The location of the cypher-shell.bat file | |
$global:user = "neo4j" | |
$global:password = "neo" | |
# A watcher to watch | |
$fsw = New-Object IO.FileSystemWatcher $folder, $filter -Property @{IncludeSubdirectories = $false;NotifyFilter = [IO.NotifyFilters]'FileName, LastWrite'} |
I hereby claim:
To claim this, I am signing this object:
package movie; | |
import common.MapResult; | |
import org.neo4j.procedure.Context; | |
import org.neo4j.procedure.Name; | |
import org.neo4j.procedure.Procedure; | |
import java.util.Collection; | |
import java.util.HashMap; | |
import java.util.Map; |
/* | |
LinqPad available from: https://www.linqpad.net/ | |
Settings: | |
- Language = 'C# Program' | |
- Nuget | |
- Neo4jClient (min: 3.0.0-Bolt-Driver00026) [Use Development MyGet: https://www.myget.org/F/cskardon/api/v3/index.json] | |
- Neo4j.Driver (min: 1.1.2) | |
- System.Net.Http (min: 4.3.1) | |
*/ |
#Neo4jClient - It's Back!
###The Past
For those in the know - the main .NET client for Neo4j is Neo4jClient - it was developed by Tatham Oddie for the last few years and had reached a nice stable point. Tatham has had to take a more off-hand role - something called 'LIFE' has happened :) So, I (Charlotte - Hello!) have taken over the management of the Neo4jClient.
###The Now
The last Neo4jClient version prior to my taking over was 1.0.0.665 - which was stable and included a large amount of Cypher functionality, but crucially was missing Transaction support. As luck would have it the Transaction code (written by Arturo Sevilla) was sitting in a pull request.
/// <summary> | |
/// http://stackoverflow.com/questions/26818882 | |
/// Neo4jClient: Wild char Search do not work when parametarized | |
/// </summary> | |
namespace Question_26818882 | |
{ | |
using Neo4jClient; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; |
using System; | |
using System.Linq.Expressions; | |
public class CSharpLibrary | |
{ | |
public static bool CheckCompatibility<TResult>(Expression<Func<TResult>> expression) | |
{ | |
if (expression.Body.NodeType != ExpressionType.MemberInit) | |
return false; | |
using System; | |
using Neo4jClient; | |
using Neo4jClient.Cypher; | |
internal class Question_22041696 | |
{ | |
private class CityEntity { public int Id { get; set; } } | |
private class CompanyEntity { public int Id { get; set; } } | |
private class ProfessionEntity { public int Id { get; set; } } |
*Wikipedia Trie* | |
This will generate a super simple (and it is super simple) Trie based on the Wikipedia entry on, well, Tries (see http://en.wikipedia.org/wiki/Trie), and _then_ look at how we can use that to do some simple things like intellisense and spelling guidance. | |
//hide | |
//setup | |
[source,cypher] | |
---- | |
CREATE | |
(initial:en_GB), |