index.ts305 chars13 linesIn the above code, we import the Client class from the clickhouse library and create a new instance with the host details. We then define our SQL select query in selectQuery and call the query() method provided by the Client class. The toPromise() method is used to convert the observable result to a promise, which resolves with the query results. Finally, we log the query results if successful or log any errors if not.
gistlibby LogSnag