MCPcopy Create free account

hub / github.com/JasonShin/sqlx-ts / functions

Functions287 in github.com/JasonShin/sqlx-ts

↓ 1 callersMethodset_annotated_params
(&mut self, annotated_params: BTreeMap<usize, TsFieldType>)
src/ts_generator/types/ts_query.rs:397
↓ 1 callersMethodset_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 callersFunctionset_default_env_var
()
src/main.rs:38
↓ 1 callersFunctionsplit_sql_queries
Split SQL content into individual queries Handles semicolons inside strings and comments properly
src/parser/sql_parser.rs:69
↓ 1 callersFunctiontester
(someSql: string)
tests/demo/typescript/expression/call.ts:3
↓ 1 callersFunctionto_camel_case
Convert string to camelCase
src/parser/sql_parser.rs:247
↓ 1 callersFunctiontranslate_assignment
( assignment: &Assignment, table_name: &str, ts_query: &mut TsQuery, db_conn: &DBConn, )
src/ts_generator/sql_parser/expressions/translate_expr.rs:844
↓ 1 callersFunctiontranslate_assignments
( ts_query: &mut TsQuery, table_with_joins: &TableWithJoins, assignments: &Vec<Assignment>, db_conn: &
src/ts_generator/sql_parser/translate_update.rs:13
↓ 1 callersFunctiontranslate_column_name_assignment
(assignment: &Assignment)
src/ts_generator/sql_parser/expressions/translate_expr.rs:86
↓ 1 callersFunctiontranslate_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 callersFunctiontranslate_data_type
(data_type: &DataType)
src/ts_generator/sql_parser/expressions/translate_data_type.rs:33
↓ 1 callersFunctiontranslate_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 callersFunctiontranslate_insert
( ts_query: &mut TsQuery, columns: &[Ident], source: &Query, table_name: &str, conn: &DBConn, )
src/ts_generator/sql_parser/translate_insert.rs:13
↓ 1 callersFunctiontranslate_table_from_assignments
( table_with_joins: &[TableWithJoins], assignment: &Assignment, )
src/ts_generator/sql_parser/expressions/translate_table_with_joins.rs:205
↓ 1 callersFunctiontranslate_update
( ts_query: &mut TsQuery, table_with_joins: &TableWithJoins, assignments: &Vec<Assignment>, _from: &Op
src/ts_generator/sql_parser/translate_update.rs:29
↓ 1 callersFunctionverifyHash
(filePath, expectedHash)
node/postinstall.js:117
↓ 1 callersFunctionwarn
(msg)
node/postinstall.js:22
↓ 1 callersFunctionwrite_colocated_ts_file
Write colocated Type definition file next to the TS source code
src/ts_generator/generator.rs:56
↓ 1 callersFunctionwrite_single_ts_file
Write a single TS file to a target destination according to CLI_ARGS.generate_path
src/ts_generator/generator.rs:73
FunctionSomeDeco
(target: typeof DecoClass, context)
tests/demo/typescript/decorators.ts:3
Functionall_cli_flags_mysql_with_empty_config
()
tests/cli.rs:48
Functionall_cli_flags_postgres_with_empty_config
()
tests/cli.rs:10
Functionall_cli_flags_should_work_when_file_config_provides_db_configs
()
tests/cli.rs:135
Functionall_demo_json_mysql
()
tests/demo_happy_path.rs:107
Functionall_demo_json_postgres
()
tests/demo_happy_path.rs:99
Functionall_demo_should_pass
()
tests/demo_happy_path.rs:92
Functionall_demo_sqlite_should_pass
()
tests/demo_happy_path.rs:289
FunctionarrowFunction
()
tests/demo/typescript/expression/arrow-function.ts:10
FunctionarrowFunctionDefaultArgument
(x = sql`SELECT * FROM items`)
tests/demo/typescript/expression/arrow-function.ts:18
FunctionasyncFunction
()
tests/demo/typescript/expression/await.ts:3
FunctionasyncLambda
()
tests/demo/typescript/expression/await.ts:12
FunctionasyncLambdaAwaited
()
tests/demo/typescript/expression/await.ts:10
Methodbuild_configs
Build the initial connection config to be used as a HashMap
src/common/config.rs:168
Methodconnect
(&self)
src/core/postgres/pool.rs:20
Methodconnect
(&self)
src/core/mysql/pool.rs:24
Methodconnect
(&self)
src/core/sqlite/pool.rs:47
Methodconstructor
()
tests/demo/typescript/decorators.ts:11
Methodconstructor
()
tests/demo/typescript/decorators.ts:34
Methodconstructor
()
tests/demo/typescript/decorators.ts:58
Methodconstructor
(theQuery: string)
tests/demo/typescript/expression/new.ts:4
Methodconstructor
(z: string)
tests/demo/typescript/expression/class-accessors.ts:40
Methodconstructor
()
tests/demo/typescript/expression/class-accessors.ts:58
Methodconstructor
(sqlTest: string)
tests/demo/typescript/expression/super.ts:4
Methodconstructor
()
tests/demo/typescript/expression/super.ts:10
Methodconstructor
(private value: T)
tests/demo/typescript/expression/method_chain.ts:9
Methoddefault
()
src/ts_generator/information_schema.rs:28
Methoddefault
()
src/common/config.rs:84
Methoddefault
()
src/common/dotenv.rs:17
MethoddefaultMethod
()
tests/demo/typescript/expression/class-accessors.ts:17
Functiondefault_bool
()
src/common/config.rs:23
Functiondemo
()
tests/demo/typescript/demo.ts:6
Functionfails_if_dotenv_missing
()
tests/dotenv.rs:76
MethodfindAll
()
tests/demo/typescript/decorators.ts:16
MethodfindAll
()
tests/demo/typescript/decorators.ts:39
MethodfindAll
()
tests/demo/typescript/decorators.ts:63
MethodfindNothing
()
tests/demo/typescript/decorators.ts:20
MethodfindNothing
()
tests/demo/typescript/decorators.ts:43
MethodfindNothing
()
tests/demo/typescript/decorators.ts:67
MethodfindProtected
()
tests/demo/typescript/decorators.ts:28
MethodfindProtected
()
tests/demo/typescript/decorators.ts:51
MethodfindProtected
()
tests/demo/typescript/decorators.ts:75
MethodfindPublic
()
tests/demo/typescript/decorators.ts:24
MethodfindPublic
()
tests/demo/typescript/decorators.ts:47
MethodfindPublic
()
tests/demo/typescript/decorators.ts:71
Functionfind_sqlx_import_alias
(import_decl: &ImportDecl)
src/parser/import.rs:3
Methodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/core/sqlite/pool.rs:36
Methodfmt
(&self, f: &mut fmt::Formatter<'_>)
src/ts_generator/types/ts_query.rs:128
Methodfmt
(&self, f: &mut Formatter<'_>)
src/ts_generator/sql_parser/quoted_strings.rs:19
Methodfmt
(&self, f: &mut fmt::Formatter<'_>)
src/common/cli.rs:6
Methodfrom_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
Functiongen
()
tests/demo/typescript/expression/yield.ts:3
Methodgenerate_types_config
(file_config_path: &PathBuf)
src/common/config.rs:138
Functiongenerate_types_enabled_uses_the_cli_option
()
tests/cli.rs:181
Functiongenerate_types_work_when_both_cli_and_file_provides_it
()
tests/cli.rs:86
MethodgetItems
()
demo/pg/index.ts:48
Methodget_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
Methodget_ignore_patterns
(ignore_config_path: &PathBuf)
src/common/config.rs:111
Methodget_log_level
(file_config_path: &PathBuf)
src/common/config.rs:418
Methodget_ts_field_from_annotation
(annotated_type: &str)
src/ts_generator/types/ts_query.rs:283
Methodget_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
Methodget_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
Methodget_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
Methodget_var
(key: &str)
src/common/dotenv.rs:23
Methodhas_broken
(&self, client: &mut Client)
src/core/postgres/pool.rs:61
Methodhas_broken
(&self, conn: &mut Self::Connection)
src/core/mysql/pool.rs:74
Methodhas_broken
(&self, _conn: &mut Self::Connection)
src/core/sqlite/pool.rs:79
Methodhmm
()
tests/demo/typescript/expression/class-accessors.ts:65
Functionis_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
Functionis_table_function
(table_name: &str, table_with_joins: &[TableWithJoins])
src/ts_generator/sql_parser/expressions/translate_table_with_joins.rs:9
Methodis_valid
(&self, client: &mut Client)
src/core/postgres/pool.rs:57
Methodis_valid
(&self, conn: &mut Self::Connection)
src/core/mysql/pool.rs:64
Methodis_valid
(&self, conn: &mut Self::Connection)
src/core/sqlite/pool.rs:67
FunctionjsFunction
()
tests/demo/file_extensions/queries-js.js:9
Functionloads_env_vars_from_dotenv_file
()
tests/dotenv.rs:9
Functionloads_env_vars_from_dotenv_file_but_wrong_config
()
tests/dotenv.rs:43
Functionmain
()
src/main.rs:45
FunctionmjsFunction
()
tests/demo/file_extensions/queries-mjs.mjs:9
Functionmysql_db_url_failure_test
()
tests/cli.rs:463
Functionmysql_db_url_from_config_test
()
tests/cli.rs:371
Functionmysql_db_url_test
()
tests/cli.rs:322
← previousnext →101–200 of 287, ranked by callers