This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Neo4j.Driver.V1; | |
namespace Test | |
{ | |
class Program |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
using System.Net.Security; | |
using System.Net.Sockets; | |
using System.Runtime.InteropServices; | |
using System.Security.Authentication; | |
using System.Security.Cryptography.X509Certificates; | |
namespace SNI.Test.Local | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"os" | |
"github.com/neo4j/neo4j-go-driver/neo4j" | |
) | |
var ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ( | |
driver neo4j.Driver | |
err error | |
) | |
if driver, err = neo4j.NewDriver(uri, neo4j.BasicAuth(username, password, ""), func(config *neo4j.Config) { | |
config.Log = neo4j.ConsoleLogger(neo4j.ERROR) | |
}); err != nil { | |
return err | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ( | |
session neo4j.Session | |
err error | |
) | |
if session, err = driver.Session(neo4j.AccessModeRead); err != nil { | |
return err | |
} | |
defer session.Close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func executeQuery(tx neo4j.Transaction) (interface{}, error) { | |
var ( | |
counter int | |
result neo4j.Result | |
err error | |
) | |
if result, err = tx.Run(query, nil); err != nil { | |
return nil, err | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ( | |
recordsProcessed interface{} | |
err error | |
) | |
if recordsProcessed, err = session.ReadTransaction(executeQuery); err != nil { | |
return err | |
} | |
fmt.Printf("\n%d records processed\n", recordsProcessed) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"os" | |
"strings" | |
"github.com/neo4j/neo4j-go-driver/neo4j" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start from golang image based on alpine-3.8 | |
FROM golang:1.10-alpine3.8 AS dev-build | |
# add our cgo dependencies | |
RUN apk add --no-cache ca-certificates cmake make g++ openssl-dev git curl pkgconfig | |
# clone latest seabolt 1.7 source code | |
RUN git clone -b 1.7 https://github.com/neo4j-drivers/seabolt.git /seabolt | |
# invoke cmake build and install artifacts - default location is /usr/local | |
WORKDIR /seabolt/build | |
# CMAKE_INSTALL_LIBDIR=lib is a hack where we override default lib64 to lib to workaround a defect | |
# in our generated pkg-config file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ( | |
driver neo4j.Driver | |
err error | |
) | |
useConsoleLogger := func() func(config *neo4j.Config) { | |
return func(config *neo4j.Config) { | |
config.Log = neo4j.ConsoleLogger(neo4j.ERROR) | |
} | |
} |
OlderNewer