Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JasonShin/sqlx-ts
/ functions
Functions
287 in github.com/JasonShin/sqlx-ts
⨍
Functions
287
◇
Types & classes
1,936
↓ 1 callers
Method
set_annotated_params
(&mut self, annotated_params: BTreeMap<usize, TsFieldType>)
src/ts_generator/types/ts_query.rs:397
↓ 1 callers
Method
set_annotated_results
set annotatd results to ts query so when generating ts types, it can use annotated results wherever possible
src/ts_generator/types/ts_query.rs:393
↓ 1 callers
Function
set_default_env_var
()
src/main.rs:38
↓ 1 callers
Function
split_sql_queries
Split SQL content into individual queries Handles semicolons inside strings and comments properly
src/parser/sql_parser.rs:69
↓ 1 callers
Function
tester
(someSql: string)
tests/demo/typescript/expression/call.ts:3
↓ 1 callers
Function
to_camel_case
Convert string to camelCase
src/parser/sql_parser.rs:247
↓ 1 callers
Function
translate_assignment
( assignment: &Assignment, table_name: &str, ts_query: &mut TsQuery, db_conn: &DBConn, )
src/ts_generator/sql_parser/expressions/translate_expr.rs:844
↓ 1 callers
Function
translate_assignments
( ts_query: &mut TsQuery, table_with_joins: &TableWithJoins, assignments: &Vec<Assignment>, db_conn: &
src/ts_generator/sql_parser/translate_update.rs:13
↓ 1 callers
Function
translate_column_name_assignment
(assignment: &Assignment)
src/ts_generator/sql_parser/expressions/translate_expr.rs:86
↓ 1 callers
Function
translate_column_name_expr
Given an expression e.g. WHERE some_column = ? or a compound identifier e.g. WHERE some_table.some_column = ? it should return the correct column n
src/ts_generator/sql_parser/expressions/translate_expr.rs:78
↓ 1 callers
Function
translate_data_type
(data_type: &DataType)
src/ts_generator/sql_parser/expressions/translate_data_type.rs:33
↓ 1 callers
Function
translate_delete
( ts_query: &mut TsQuery, where_conditions: &Expr, // WHERE conditions of the delete statement table_nam
src/ts_generator/sql_parser/translate_delete.rs:7
↓ 1 callers
Function
translate_insert
( ts_query: &mut TsQuery, columns: &[Ident], source: &Query, table_name: &str, conn: &DBConn, )
src/ts_generator/sql_parser/translate_insert.rs:13
↓ 1 callers
Function
translate_table_from_assignments
( table_with_joins: &[TableWithJoins], assignment: &Assignment, )
src/ts_generator/sql_parser/expressions/translate_table_with_joins.rs:205
↓ 1 callers
Function
translate_update
( ts_query: &mut TsQuery, table_with_joins: &TableWithJoins, assignments: &Vec<Assignment>, _from: &Op
src/ts_generator/sql_parser/translate_update.rs:29
↓ 1 callers
Function
verifyHash
(filePath, expectedHash)
node/postinstall.js:117
↓ 1 callers
Function
warn
(msg)
node/postinstall.js:22
↓ 1 callers
Function
write_colocated_ts_file
Write colocated Type definition file next to the TS source code
src/ts_generator/generator.rs:56
↓ 1 callers
Function
write_single_ts_file
Write a single TS file to a target destination according to CLI_ARGS.generate_path
src/ts_generator/generator.rs:73
Function
SomeDeco
(target: typeof DecoClass, context)
tests/demo/typescript/decorators.ts:3
Function
all_cli_flags_mysql_with_empty_config
()
tests/cli.rs:48
Function
all_cli_flags_postgres_with_empty_config
()
tests/cli.rs:10
Function
all_cli_flags_should_work_when_file_config_provides_db_configs
()
tests/cli.rs:135
Function
all_demo_json_mysql
()
tests/demo_happy_path.rs:107
Function
all_demo_json_postgres
()
tests/demo_happy_path.rs:99
Function
all_demo_should_pass
()
tests/demo_happy_path.rs:92
Function
all_demo_sqlite_should_pass
()
tests/demo_happy_path.rs:289
Function
arrowFunction
()
tests/demo/typescript/expression/arrow-function.ts:10
Function
arrowFunctionDefaultArgument
(x = sql`SELECT * FROM items`)
tests/demo/typescript/expression/arrow-function.ts:18
Function
asyncFunction
()
tests/demo/typescript/expression/await.ts:3
Function
asyncLambda
()
tests/demo/typescript/expression/await.ts:12
Function
asyncLambdaAwaited
()
tests/demo/typescript/expression/await.ts:10
Method
build_configs
Build the initial connection config to be used as a HashMap
src/common/config.rs:168
Method
connect
(&self)
src/core/postgres/pool.rs:20
Method
connect
(&self)
src/core/mysql/pool.rs:24
Method
connect
(&self)
src/core/sqlite/pool.rs:47
Method
constructor
()
tests/demo/typescript/decorators.ts:11
Method
constructor
()
tests/demo/typescript/decorators.ts:34
Method
constructor
()
tests/demo/typescript/decorators.ts:58
Method
constructor
(theQuery: string)
tests/demo/typescript/expression/new.ts:4
Method
constructor
(z: string)
tests/demo/typescript/expression/class-accessors.ts:40
Method
constructor
()
tests/demo/typescript/expression/class-accessors.ts:58
Method
constructor
(sqlTest: string)
tests/demo/typescript/expression/super.ts:4
Method
constructor
()
tests/demo/typescript/expression/super.ts:10
Method
constructor
(private value: T)
tests/demo/typescript/expression/method_chain.ts:9
Method
default
()
src/ts_generator/information_schema.rs:28
Method
default
()
src/common/config.rs:84
Method
default
()
src/common/dotenv.rs:17
Method
defaultMethod
()
tests/demo/typescript/expression/class-accessors.ts:17
Function
default_bool
()
src/common/config.rs:23
Function
demo
()
tests/demo/typescript/demo.ts:6
Function
fails_if_dotenv_missing
()
tests/dotenv.rs:76
Method
findAll
()
tests/demo/typescript/decorators.ts:16
Method
findAll
()
tests/demo/typescript/decorators.ts:39
Method
findAll
()
tests/demo/typescript/decorators.ts:63
Method
findNothing
()
tests/demo/typescript/decorators.ts:20
Method
findNothing
()
tests/demo/typescript/decorators.ts:43
Method
findNothing
()
tests/demo/typescript/decorators.ts:67
Method
findProtected
()
tests/demo/typescript/decorators.ts:28
Method
findProtected
()
tests/demo/typescript/decorators.ts:51
Method
findProtected
()
tests/demo/typescript/decorators.ts:75
Method
findPublic
()
tests/demo/typescript/decorators.ts:24
Method
findPublic
()
tests/demo/typescript/decorators.ts:47
Method
findPublic
()
tests/demo/typescript/decorators.ts:71
Function
find_sqlx_import_alias
(import_decl: &ImportDecl)
src/parser/import.rs:3
Method
fmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/core/sqlite/pool.rs:36
Method
fmt
(&self, f: &mut fmt::Formatter<'_>)
src/ts_generator/types/ts_query.rs:128
Method
fmt
(&self, f: &mut Formatter<'_>)
src/ts_generator/sql_parser/quoted_strings.rs:19
Method
fmt
(&self, f: &mut fmt::Formatter<'_>)
src/common/cli.rs:6
Method
from_sqlparser_datatype
Converts a sqlparser DataType from table alias column definitions to TsFieldType This is used to infer types from table-valued function aliases like:
src/ts_generator/types/ts_query.rs:301
Function
gen
()
tests/demo/typescript/expression/yield.ts:3
Method
generate_types_config
(file_config_path: &PathBuf)
src/common/config.rs:138
Function
generate_types_enabled_uses_the_cli_option
()
tests/cli.rs:181
Function
generate_types_work_when_both_cli_and_file_provides_it
()
tests/cli.rs:86
Method
getItems
()
demo/pg/index.ts:48
Method
get_default_connection_config
Figures out the default connection, default connection must exist for sqlx-ts to work It will retrieve a default connection in the following order 1.
src/common/config.rs:209
Method
get_ignore_patterns
(ignore_config_path: &PathBuf)
src/common/config.rs:111
Method
get_log_level
(file_config_path: &PathBuf)
src/common/config.rs:418
Method
get_ts_field_from_annotation
(annotated_type: &str)
src/ts_generator/types/ts_query.rs:283
Method
get_ts_field_type_from_mysql_field_type
( mysql_field_type: String, table_name: String, field_name: String, enum_values: Option<Vec<St
src/ts_generator/types/ts_query.rs:220
Method
get_ts_field_type_from_postgres_field_type
The method is to convert the data_type field that you get from PostgreSQL as strings into TsFieldType so when we stringify TsFieldType, we can correct
src/ts_generator/types/ts_query.rs:195
Method
get_ts_field_type_from_sqlite_field_type
Converts SQLite type affinity strings to TsFieldType. SQLite uses type affinity rules, so we match common type names.
src/ts_generator/types/ts_query.rs:247
Method
get_var
(key: &str)
src/common/dotenv.rs:23
Method
has_broken
(&self, client: &mut Client)
src/core/postgres/pool.rs:61
Method
has_broken
(&self, conn: &mut Self::Connection)
src/core/mysql/pool.rs:74
Method
has_broken
(&self, _conn: &mut Self::Connection)
src/core/sqlite/pool.rs:79
Method
hmm
()
tests/demo/typescript/expression/class-accessors.ts:65
Function
is_mysql_version_above
Checks if the MySQL server at the given host:port is above the specified major.minor version. Uses `docker exec` to query the version. Returns true if
test-utils/src/sandbox.rs:116
Function
is_table_function
(table_name: &str, table_with_joins: &[TableWithJoins])
src/ts_generator/sql_parser/expressions/translate_table_with_joins.rs:9
Method
is_valid
(&self, client: &mut Client)
src/core/postgres/pool.rs:57
Method
is_valid
(&self, conn: &mut Self::Connection)
src/core/mysql/pool.rs:64
Method
is_valid
(&self, conn: &mut Self::Connection)
src/core/sqlite/pool.rs:67
Function
jsFunction
()
tests/demo/file_extensions/queries-js.js:9
Function
loads_env_vars_from_dotenv_file
()
tests/dotenv.rs:9
Function
loads_env_vars_from_dotenv_file_but_wrong_config
()
tests/dotenv.rs:43
Function
main
()
src/main.rs:45
Function
mjsFunction
()
tests/demo/file_extensions/queries-mjs.mjs:9
Function
mysql_db_url_failure_test
()
tests/cli.rs:463
Function
mysql_db_url_from_config_test
()
tests/cli.rs:371
Function
mysql_db_url_test
()
tests/cli.rs:322
← previous
next →
101–200 of 287, ranked by callers