Explorar el Código

match with fields

libf hace 2 meses
padre
commit
fbebb41979
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. 1 1
      importer/importer.go
  2. 3 3
      importer/odbcimporter.go

+ 1 - 1
importer/importer.go

@@ -408,7 +408,7 @@ func Check() {
 		fmt.Println(string(bs))
 	}
 	{
-		mql := `match ("level1:E2E:OTR0002L")-[*]->(),("level1:E2E:OTR0002L")<-[*]-() in "level1","level2"`
+		mql := `match ("level1:E2E:OTR0002L")-[*]->(),("level1:E2E:OTR0002L")<-[*]-() with namespace="m3cnet", fields="uniqueid,distname" in "level1","level2"`
 		r, e := client.Query(mql).Do()
 		if e != nil {
 			panic(merrs.NewError(e))

+ 3 - 3
importer/odbcimporter.go

@@ -493,10 +493,10 @@ func RetryConfig(retryconfig ...string) (orcs []*ODBCRetryConfig) {
 	}
 	for _, retrycfg := range retryconfig {
 		ss := reodbcretry.FindStringSubmatch(retrycfg)
-		if len(ss) > 1 {
+		if len(ss) > 2 {
 			orc := &ODBCRetryConfig{
-				retry:    cast.ToInt(ss[0]),
-				contains: ss[1],
+				retry:    cast.ToInt(ss[1]),
+				contains: ss[2],
 			}
 			if orc.contains == "" {
 				defaultorc = orc