3 ms·
Like I mentioned, I prefer using SQL directly. I just want some type safety on the result of my query. Is it going to be a list of rows, is it going to be a sin
by written-beyond 2y ago
Like I mentioned, I prefer using SQL directly. I just want some type safety on the result of my query. Is it going to be a list of rows, is it going to be a single row, what will the columns be named exactly, will I have to convert the resulting column value to my specified type.
Those are just a lot of steps
- sargstuff 2y agosee information about sql queries from shell command line. aka nosql - oci cli [1] database schema data can be queried to find the table(s) field name & table(s) type. That is an additional separate sql query though & would potentially be different for different databases & database versions. ODBC protocol was designed to address the 'different database schema formats' issues via a 'universal database access' interface. (vs. jdbc, java language equivalent of odbc)[2]. The command line program, usql[3] provides support for sql querying different databases. Setting sql query to output query results in json format would provide relevant information such as field name & data type within the sql output data. note: sql allows for renaming table names within the sql query. aka select tablea.first_name as surname ---- [1] : http://docs.oracle.com/en-us/iaas/tools/oci-cli/3.51.9/oci_cli_docs/cmdref/nosql.html http://docs.oracle.com/en-us/iaas/tools/oci-cli/3.51.9/oci_c... [2] : https://en.wikipedia.org/wiki/Open_Database_Connectivity https://en.wikipedia.org/wiki/Open_Database_Connectivity [3] : https://github.com/xo/usql https://github.com/xo/usql