예제 #1
0
        public static void CustomBinderDemo()
        {
            var db = new ClickHouseDatabase(
                new ClickHouseConnectionSettings("Compress=True;CheckCompressedHash=False;Compressor=lz4;Host=localhost;Port=9000;User=default;Password=;SocketTimeout=600000;Database=system;"),
                new ClickHouseCommandFormatter(),
                new ClickHouseConnectionFactory(),
                null,
                new NotImplementedPropertyBinder());

            db.Open();

            // Execute query and get result
            var queryMappingSuccess = CastRawValuesToClassTypeProperties(db);

            db.Close();
        }
예제 #2
0
        static void Main(string[] args)
        {
            var db = new ClickHouseDatabase(
                new ClickHouseConnectionSettings("Compress=True;CheckCompressedHash=False;Compressor=lz4;Host=localhost;Port=9000;User=default;Password=;SocketTimeout=600000;Database=default;"),
                new ClickHouseCommandFormatter(),
                new ClickHouseConnectionFactory(),
                null);

            db.Open();
            for (int i = 0; i < 10; i++)
            {
                var res = db.DatabaseExists("test");
                Console.WriteLine($"Database test exists: {res}");
            }

            db.Close();
        }