Comments (3)
You can implement such logic yourself - there are helper functions to retrieve the table config:
import { getTableColumns, getTableIndexes, getTableForeignKeys, getTableCompositePrimaryKeys, getTableChecks } from 'drizzle-orm/sqlite-core/utils';
const columns = getTableColumns(table);
const indexes = getTableIndexes(table);
...
// do any linting you want :)
from drizzle-orm.
Excellent, will use this model for now. thanks!
from drizzle-orm.
import { getTableColumns, getTableIndexes, getTableForeignKeys, getTableCompositePrimaryKeys, getTableChecks } from 'drizzle-orm/sqlite-core/utils';
I don't see these items exported from that package. Really would love access to getTableColumns
in relation to #451
from drizzle-orm.
Related Issues (20)
- [BUG]: (Planetscale Serverless) TypeError: fetch failed, code: 'UND_ERR_CONNECT_TIMEOUT' HOT 1
- [BUG]: Drizzle differentiates between the return types of node-postgres and pg-proxy HOT 1
- [BUG]: Access denied for user 'root'@'localhost' (using password: YES) at createConnection2 HOT 1
- [BUG]: Return type of timestamp with mode "string" using vercel-postgres is Date and not string
- Issues with the generated sql files HOT 3
- [FEATURE]: drizzle-kit push:* --accept-data-loss
- [FEATURE]: Create database with relations for tests
- [BUG]: insert "Maximum call stack size exceeded." HOT 1
- [BUG]: drizzle-typebox mapping int fields to Type.Number
- [BUG]: Deeply nested queries fail due to table name length HOT 4
- [BUG]: node-postgres date parser modified globally HOT 1
- [BUG]:findFirst not working HOT 14
- [BUG]: Drizzle-kit Introspection Failed to Declare Default Value in SQL HOT 1
- [BUG]: values of `time` data type shows null in drizzle studio
- [BUG]: .$onUpdate: TypeScript cannot correctly infer the function's return type.
- [FEATURE]: Unsigned Integer Mode on SQLite
- [FEATURE]: Querying User Data Response Format
- [FEATURE]: allow INSERT in CTEs (WITH clauses) HOT 2
- [BUG]: HOT 1
- [BUG]:Failed to retrieve the Cloudflare request context HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drizzle-orm.