122 sao GitHub và vẫn tăng — rethinkdb/rethinkdb-ts là dự án TypeScript mà TopGit đang theo dõi trên nền tảng. RethinkDB TypeScript driver
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
// if you support import
import { r } from 'rethinkdb-ts';
// if you dont
const { r } = require('rethinkdb-ts');
Initialize
// in an async context
// if you want to initialize a connection pool
await r.connectPool(options);
// if you want to initialize a single connection
const conn = await r.connect(options);
STATUS:
Fully working typescript driver!
Rebuilt from scratch using the latest ES/TS features for readability and maintainability
Drop-in replacement for rethinkdbdash with only some minor changes
CHANGES FROM RETHINKDBDASH
Support for complex socket configuration + tls (notice that for SSL/TLS or any configuration more complex than { host: '...', port: '...' } you'll have to encapsulate in a server/servers property:
{
server: {
host: '172.23.12.2',
port: 21085,
tls: true,
ca: caCert,
// If your certificate common name doesn't match the host:
// checkServerIdentity() {}
}
}
The options for standard connections is described here.
If you want an SSL/TLS, add tls: true and the options described here and
Importing property instead of entire library: const {r} = require('rethinkdb-ts') or import {r} from 'rethinkdb-ts' instead of const r = require('rethinkdbdash')(options)
No top level initialization, initializing a pool is done by await r.connectPool()
No { cursor: true } option, for getting a cursor use .getCursor(runOptions) instead of .run(runOptions)
.run() will coerce streams to array by default feeds will return a cursor like rethinkdbdash
Uses native promises instead of bluebird
A cursor is already a readable stream, no need for toStream()
A readable stream is already an async iterator in node 10 no need for .asyncIterator()
In a connection pool, reusing open connections that already run queries instead of making queries wait for a connection when max connections exceeded
Integrated fully encompasing type definitions
NEW FEATURES
serialize / deserialize. You can store the query as a string like this const serializedQuery = r.table(...).filter(...).map(...).serialize() and get it like this r.deserialize(serializedQuery).run() or even r.deserialize<RStream>(serializedQuery).reduce(...).run() the serialized query is a normal string so you can store it in the DB. No need for ugly workarounds like .toString and eval anymore. Also the serialized query is the actual JSON that gets sent to the server so it should be cross-language compatible if any other driver cares to implement it.
DROPPING SUPPORT:
Support node < 12
Support callbacks
Support using .then() directly on a query (optionalRun), it can confuse users that queries are promises leading to false assumptions:
Queries are not promises since they are not eagerly evaluated and therefore they can:
.run() as many times as you want (promises run only once and return the same value without running other times)
be stored for future evaluation (promises run as you create them)
Support browsers (Unless it's the only demand of making this driver used instead of rethinkdbdash)
Support write streams (Does anyone use it? Will add it if its a popular demand)
Multiple connection pools (if someone has a good usecase I'll support it)
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/rethinkdb/rethinkdb-ts là nguồn chính thức.
rethinkdb/rethinkdb-ts có bao nhiêu sao?
rethinkdb/rethinkdb-ts có 122 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/rethinkdb/rethinkdb-ts. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
rethinkdb/rethinkdb-ts có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho rethinkdb/rethinkdb-ts. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
rethinkdb/rethinkdb-ts còn đang phát triển không?
Commit gần nhất trên rethinkdb/rethinkdb-ts là 1 tháng trước (theo timestamp GitHub). Repo có 20 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
rethinkdb/rethinkdb-ts viết bằng ngôn ngữ gì?
rethinkdb/rethinkdb-ts chủ yếu viết bằng TypeScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc rethinkdb-ts có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về rethinkdb-ts.