2017-01-20 02:34:35 +00:00
|
|
|
#include <iostream>
|
|
|
|
#include <DB/Core/Field.h>
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char ** argv)
|
|
|
|
{
|
2017-04-01 07:20:54 +00:00
|
|
|
using namespace DB;
|
2017-01-20 02:34:35 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
Field f;
|
2017-01-20 02:34:35 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
f = Field{String{"Hello, world"}};
|
|
|
|
std::cerr << f.get<String>() << "\n";
|
|
|
|
f = Field{String{"Hello, world!"}};
|
|
|
|
std::cerr << f.get<String>() << "\n";
|
|
|
|
f = Field{Array{Field{String{"Hello, world!!"}}}};
|
|
|
|
std::cerr << f.get<Array>()[0].get<String>() << "\n";
|
|
|
|
f = String{"Hello, world!!!"};
|
|
|
|
std::cerr << f.get<String>() << "\n";
|
|
|
|
f = Array{Field{String{"Hello, world!!!!"}}};
|
|
|
|
std::cerr << f.get<Array>()[0].get<String>() << "\n";
|
|
|
|
f = Array{String{"Hello, world!!!!!"}};
|
|
|
|
std::cerr << f.get<Array>()[0].get<String>() << "\n";
|
2017-01-20 02:34:35 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
return 0;
|
2017-01-20 02:34:35 +00:00
|
|
|
}
|