コード例 #1
0
        static void Main(string[] args)
        {
            var cs = new CassandraDBFromSwagger.CassandraDBFromSwagger(args[0]);

            foreach (var c in cs.Generate())
            {
                Console.WriteLine(c);
            }
        }
コード例 #2
0
        public void Generate()
        {
            var session = Utils.CassandraUtils.OpenCassandraSession(connectionStringOrLocalSettingsJsonFile);
            var b       = new Builder();
            var cassandraDBFromSwagger = new CassandraDBFromSwagger.CassandraDBFromSwagger(this.swaggerFileName);
            var cqlStatements          = cassandraDBFromSwagger.Generate();

            foreach (var cqlStatement in cqlStatements)
            {
                session.Execute(cqlStatement);
            }
        }