コード例 #1
0
        public void Should_Be_Able_To_Create_Vertex_With_CollectionProperties()
        {
            var g    = DseGraph.Traversal(Session);
            var stmt = DseGraph.StatementFromTraversal(g.AddV("collection_v")
                                                       .Property("pk", "What can kill a dragon")
                                                       .Property("sub_prop", new List <string> {
                "Qyburn's scorpion"
            })
                                                       .Property("sub_prop2", new List <string> {
                "Another dragon"
            }));

            Session.ExecuteGraph(stmt);
            StatementCoreIntegrationTest.VerifyCollectionProperties(Session, g, "What can kill a dragon", "Qyburn's scorpion", "Another dragon");
            var dropstmt = DseGraph.StatementFromTraversal(g.V().HasLabel("collection_v").Drop());

            Session.ExecuteGraph(dropstmt);
        }
コード例 #2
0
        public void Should_Be_Able_To_Create_Vertex_With_CollectionProperties()
        {
            Session.UserDefinedTypes.Define(UdtMap.For <MetaProp>("meta_prop_type", GraphName)
                                            .Map(u => u.SubProp, "sub_prop").Map(u => u.SubProp2, "sub_prop2"));
            var g = DseGraph.Traversal(Session);

            g.AddV("collection_v")
            .Property("pk", "White Walkers")
            .Property("sub_prop", new List <string> {
                "Dragonglass"
            })
            .Property("sub_prop2", new List <string> {
                "Valyrian steel"
            })
            .Next();
            StatementCoreIntegrationTest.VerifyCollectionProperties(Session, g, "White Walkers", "Dragonglass", "Valyrian steel");
            g.V().HasLabel("collection_v").Drop().Next();
        }