You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
700 B
TypeScript
27 lines
700 B
TypeScript
import { createClient } from "@clickhouse/client";
|
|
import dotenv from "dotenv";
|
|
import { Env } from "@humanwhocodes/env";
|
|
|
|
dotenv.config();
|
|
|
|
const env = new Env();
|
|
const CLICKHOUSE_USERNAME = env.require("CLICKHOUSE_USERNAME");
|
|
const CLICKHOUSE_PASSWORD = env.require("CLICKHOUSE_PASSWORD");
|
|
|
|
export const client = createClient({
|
|
username: CLICKHOUSE_USERNAME,
|
|
password: CLICKHOUSE_PASSWORD,
|
|
clickhouse_settings: {
|
|
async_insert: 1,
|
|
output_format_json_quote_32bit_integers: 0,
|
|
output_format_json_quote_64bit_integers: 0,
|
|
output_format_json_quote_64bit_floats: 0,
|
|
output_format_json_quote_32bit_floats: 0,
|
|
},
|
|
});
|
|
|
|
client.insert({
|
|
table: "option_quotes",
|
|
values: [],
|
|
});
|