1. A computer-implemented method for performing a database query by using a user-defined function (UDF), comprising: detecting whether a command for invoking the UDF to transmit a parameter value has been received; and based on detecting that the command for invoking the UDF to transmit the parameter value has been received: starting a first interface of the UDF; receiving the parameter value through the first interface; transmitting the received parameter value to an external data source; and returning to detecting whether the command for invoking the UDF to transmit the parameter value has been received.