Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new third-party tool - Drizzle ORM #71

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Mrinank-Bhowmick
Copy link

Drizzle ORM is a modern TypeScript ORM designed for SQL databases. It provides a type-safe API for building queries and managing database interactions, making it an excellent choice for developers working with TypeScript and JavaScript.

This PR adds documentation for drizzle ORM, which can interface with QuestDB. This tool was raised in issue #70 and #59 .

References taken from SQLAlchemy under Tooling and Interfaces

@CLAassistant
Copy link

CLAassistant commented Oct 25, 2024

CLA assistant check
All committers have signed the CLA.

@Mrinank-Bhowmick
Copy link
Author

@goodroot any updates?

@nwoolmer
Copy link
Contributor

Hey @Mrinank-Bhowmick, I can take a look at this today :)

Copy link
Contributor

@nwoolmer nwoolmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

It would be great if you could align the example with what we use in other parts of the docs, for example, the trades table. See node ILP client docs here: https://github.com/questdb/nodejs-questdb-client

The trades schema can be obtained from demo.questdb.io or from the example.

- Node.js
- drizzle-orm
- pg
- A QuestDB instance
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- A QuestDB instance
- A QuestDB instance

Comment on lines 54 to 57
CREATE TABLE IF NOT EXISTS some_table (
x INT NOT NULL,
y INT NOT NULL
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CREATE TABLE IF NOT EXISTS some_table (
x INT NOT NULL,
y INT NOT NULL
);
CREATE TABLE IF NOT EXISTS some_table (
x INT,
y INT
);

@Mrinank-Bhowmick
Copy link
Author

@nwoolmer Thanks for the reply.
So i have to take reference from this? https://questdb.io/docs/clients/ingest-node/

@nwoolmer
Copy link
Contributor

Yes, it's minor but we try to keep examples similar i.e based on trades table. It helps to compare across languages and libraries :)

@Mrinank-Bhowmick
Copy link
Author

Mrinank-Bhowmick commented Oct 29, 2024

@nwoolmer can you review my recent changes now 🚀
image

Comment on lines 62 to 69
CREATE TABLE IF NOT EXISTS trades (
symbol TEXT,
side TEXT,
price DOUBLE PRECISION,
amount DOUBLE PRECISION,
timestamp TIMESTAMP
);
`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CREATE TABLE IF NOT EXISTS trades (
symbol TEXT,
side TEXT,
price DOUBLE PRECISION,
amount DOUBLE PRECISION,
timestamp TIMESTAMP
);
`);
CREATE TABLE IF NOT EXISTS trades (
symbol VARCHAR,
side VARCHAR,
price DOUBLE,
amount DOUBLE,
timestamp TIMESTAMP
);
`);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants