protected override void Run <TConn, TCommand, TParameter, TAdaptor, TException>(BaseAdoStore <TConn, TCommand, TParameter, TAdaptor, TException> manager) { try { String schema = manager.CheckSchema(); AdoSchemaDefinition def = AdoSchemaHelper.SchemaDefinitions.Where(d => d.Name.Equals(schema)).FirstOrDefault(); if (def != null) { String script = def.GetScript(AdoSchemaScriptType.Drop, AdoSchemaScriptDatabase.MicrosoftSqlServer); if (script != null) { manager.ExecuteSqlFromResource(script); } else { Console.Error.WriteLine("rdfSqlStorage: Error: Schema " + schema + " does not have a drop script associated with it so cannot be dropped with this tool"); } } else { Console.Error.WriteLine("rdfSqlStorage: Error: Schema " + schema + " is not a built-in schema so cannot be created/dropped with this tool"); } } finally { manager.Dispose(); } }
protected override void Run <TConn, TCommand, TParameter, TAdaptor, TException>(BaseAdoStore <TConn, TCommand, TParameter, TAdaptor, TException> manager) { try { int i = 0; Console.WriteLine("rdfSqlStorage: Listing Graphs..."); foreach (Uri u in manager.ListGraphs()) { if (u != null) { Console.WriteLine(u.ToString()); } else { Console.WriteLine("Default Graph"); } i++; } Console.WriteLine("rdfSqlStorage: Listed " + i + " Graph(s)"); } finally { manager.Dispose(); } }
protected override void Run <TConn, TCommand, TParameter, TAdaptor, TException>(BaseAdoStore <TConn, TCommand, TParameter, TAdaptor, TException> manager) { try { Console.WriteLine("rdfSqlStorage: Connected OK"); int version = manager.CheckVersion(); Console.WriteLine("rdfSqlStorage: Version " + version); String schema = manager.CheckSchema(); Console.WriteLine("rdfSqlStorage: Schema " + schema); } finally { manager.Dispose(); } }