You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue
Once we parse the query and get the JSON object, we further manipulate the JSON object to get it into a certain shape. To do that we use smaller helper functions in between. It would be nice if we could define types for this smaller functions.
Since these functions take different parts of the JSON and those parts already have types defined within the library ( for example, CreateConstraintForeign, CreateConstraintCheck and so on ), would it be possible to expose those types so that we can utilize them?
Database Engine
Snowflake
To Reproduce
-the node-sql-parser version: 5.2.0
-the node version: 20.11.1
Expected behavior
Allow import statements for types. For example:
import { CreateColumnDefinition, CreateConstraintForeign, CreateConstraintDefinition } from 'node-sql-parser'
const extractIsFK = ( alterASTs: Alter[], fkConstraintASTs: CreateConstraintForeign[] ): boolean => {
// Doing some stuffs here
return some_boolean_value
}
Issue
Once we parse the query and get the JSON object, we further manipulate the JSON object to get it into a certain shape. To do that we use smaller helper functions in between. It would be nice if we could define types for this smaller functions.
Since these functions take different parts of the JSON and those parts already have types defined within the library ( for example, CreateConstraintForeign, CreateConstraintCheck and so on ), would it be possible to expose those types so that we can utilize them?
Database Engine
Snowflake
To Reproduce
-the node-sql-parser version: 5.2.0
-the node version: 20.11.1
Expected behavior
Allow import statements for types. For example:
Example in a forked repo
Please also take a look at this PR in this forked repo.
and thanks a lot for this nice library.
The text was updated successfully, but these errors were encountered: