Bun

On this page

FeaturesDatabase SupportPostgreSQLMySQLSQLiteInserting dataBulk InsertPicking columns to insertQuery Resultssql``.values() formatsql``.raw() formatSQL FragmentsDynamic Table NamesConditional QueriesDynamic columns in updatesDynamic values and where insql.array helpersql``.simple()Queries in filesUnsafe QueriesExecute and Cancelling QueriesDatabase Environment VariablesAutomatic Database DetectionMySQL Auto-DetectionSQLite Auto-DetectionPostgreSQL Auto-DetectionMySQL Environment VariablesPostgreSQL Environment VariablesSQLite Environment VariablesRuntime PreconnectionConnection OptionsMySQL OptionsPostgreSQL OptionsSQLite OptionsDynamic passwordsSQLite-Specific FeaturesQuery ExecutionSQLite PragmasData Type DifferencesTransactionsBasic TransactionsSavepointsDistributed TransactionsAuthenticationSSL Modes OverviewUsing With Connection StringsConnection PoolingReserved ConnectionsPrepared StatementsError HandlingError ClassesPostgreSQL Connection ErrorsAuthentication ErrorsQuery ErrorsData Type ErrorsProtocol ErrorsTransaction ErrorsSQLite-Specific ErrorsNumbers and BigIntBigInt Instead of StringsRoadmapDatabase-Specific FeaturesAuthentication MethodsPrepared Statements & PerformanceMultiple Result SetsCharacter Sets & CollationsConnection AttributesType HandlingDifferences from PostgreSQLMySQL-Specific FeaturesPostgreSQL-Specific FeaturesCommon Patterns & Best PracticesWorking with MySQL Result SetsMySQL Error HandlingPerformance Tips for MySQLFrequently Asked QuestionsWhy not just use an existing library?Credits