public static async Task <object> GatherDbIndexes(Neo4jService service) { //get the index details from db string query = "CALL db.indexes() yield indexName, tokenNames, properties, state, type"; string labelName = string.Empty; string indexName = string.Empty; string propertyName = string.Empty; string state = string.Empty; string type = string.Empty; SortedDictionary <string, SortedDictionary <string, Index> > indexes = new SortedDictionary <string, SortedDictionary <string, Index> >(); await service.ProcessDelegatePerRecordFromQueryAsync(query, null, (IRecord record) => { if (record == null) { return; } ; try { var tokens = (List <object>)record["tokenNames"]; labelName = (string)tokens[0]; var properties = (List <object>)record["properties"]; propertyName = (string)properties[0]; indexName = (string)record["indexName"]; state = (string)record["state"]; type = (string)record["type"]; bool isconstraint = type == "node_unique_property" ? true : false; SortedDictionary <string, Index> indexdic; if (!indexes.TryGetValue(labelName, out indexdic)) { indexdic = new SortedDictionary <string, Index>(); indexes.Add(labelName, indexdic); } indexdic.Add(propertyName, new Index { Label = labelName, IndexName = indexName, PropertyName = propertyName, State = state, IsConstraint = isconstraint }); } catch (Exception e) { //_logger.Error("Error in GatherDbStats-edgeCount: " + e.Message); } }); return(indexes); }
public UserController(Neo4jService neoService) { _neoService = neoService; }
public ReportsController(PluginManager plugman, Neo4jService service) { this._pluginmanager = plugman; this._service = service; }
public SearchController(ILogger <SearchController> logger, Neo4jService service) { this._service = service; this._logger = logger; }
public GraphController(Neo4jService service, PluginManager pluginmanager, ILogger <GraphController> logger) { this._service = service; this._pluginmanager = pluginmanager; this._logger = logger; }
public ServerInfoController(Neo4jService neoservice, ILogger <ServerInfoController> logger) { this._neoservice = neoservice; this._getter = new StatsGetter(neoservice); this._logger = logger; }
public AdminController(ILogger <AdminController> logger, PluginManager plugman, Neo4jService service) { this._neoservice = service; this._pluginmanager = plugman; this._logger = logger; }