Table-valued parameter for call statement
AssigneeSap SE
InventorsDaeho Kim, Hyojin Ha, Hyung Jo Yoon, Kyungwook Ko
Life of this patent
Estimating the term…
Abstract
In some embodiments, there is provided a computer-implemented method including receiving a call to a stored procedure that includes a first table value parameter corresponding to a first external table and a second table value parameter corresponding to a second external table; and passing, to the called stored procedure, a first bit stream of parameters from the first external table passed using the first table value parameter and a second bit stream of parameters from the second external table passed using the second table value parameter. Related systems, methods, and articles of manufacture are also disclosed.
Claims8
A computer-implemented method comprising:
- receiving, at a database management system (DBMS), a call to a stored procedure via a structured query language (SQL) query, the call comprising a first table value parameter corresponding to a first external table and a second table value parameter corresponding to a second external table;
- receiving a prepare call for the stored procedure that includes the first table value parameter corresponding to the first external table and the second table value parameter corresponding to the second external table;
- generating, in response to the prepare call, metadata including metadata indicative of a first format of the first table value parameter and a second format of the second table value parameter;
- obtaining, by the DBMS and from a client device storing the first external table and the second external table, a first bit stream of parameters from the first external table using the first table value parameter and a second bit stream of parameters from the second external table using the second table value parameter;
- transmitting the metadata to the client device;
- decoding, at a session layer, the first bit stream into a first internal table and the second bit stream into a second internal table, wherein the first internal table is mapped to a first query parameter index and the second internal table is mapped to a second query parameter index;
- and
- passing, by the DBMS and to the called stored procedure, the first bit stream of parameters and the second bit stream of parameters for execution of the SQL query.
A system comprising:
- at least one processor;
- and
- at least one memory including code which when executed by the at least one processor causes operations comprising:
- receiving, at a database management system (DBMS), a call to a stored procedure via a structured query language (SQL) query, the call comprising a first table value parameter corresponding to a first external table and a second table value parameter corresponding to a second external table;
- receiving a prepare call for the stored procedure that includes the first table value parameter corresponding to the first external table and the second table value parameter corresponding to the second external table;
- generating, in response to the prepare call, metadata including metadata indicative of a first format of the first table value parameter and a second format of the second table value parameter;
- obtaining, by the DBMS and from a client device storing the first external table and the second external table, a first bit stream of parameters from the first external table using the first table value parameter and a second bit stream of parameters from the second external table using the second table value parameter;
- transmitting the metadata to the client device;
- decoding, at a session layer, the first bit stream into a first internal table and the second bit stream into a second internal table, wherein the first internal table is mapped to a first query parameter index and the second internal table is mapped to a second query parameter index;
- and
- passing, by the DBMS and to the called stored procedure, the first bit stream of parameters and the second bit stream of parameters for execution of the SQL query.
A non-transitory computer-readable storage medium including code which when executed by at least one processor causes operations comprising:
- receiving, at a database management system (DBMS), a call to a stored procedure via a structured query language (SQL) query, the call comprising a first table value parameter corresponding to a first external table and a second table value parameter corresponding to a second external table;
- receiving a prepare call for the stored procedure that includes the first table value parameter corresponding to the first external table and the second table value parameter corresponding to the second external table;
- generating, in response to the prepare call, metadata including metadata indicative of a first format of the first table value parameter and a second format of the second table value parameter;
- obtaining, by the DBMS and from a client device storing the first external table and the second external table, a first bit stream of parameters from the first external table using the first table value parameter and a second bit stream of parameters from the second external table using the second table value parameter;
- transmitting the metadata to the client device;
- decoding, at a session layer, the first bit stream into a first internal table and the second bit stream into a second internal table, wherein the first internal table is mapped to a first query parameter index and the second internal table is mapped to a second query parameter index;
- and
- passing, by the DBMS and to the called stored procedure, the first bit stream of parameters and the second bit stream of parameters for execution of the SQL query.
Dependencies are inferred from the claim text.