Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Reading metadata of columns of a table using XSJS

$
0
0

Hi,

 

I am stuck with a problem when using XSJS APIs. I have a table as below:

     

     Table Name: Employee.

     Table columns: EID: varchar

                            Age: INT.

    

     My requirement is to get the metadata of the columns of the EMPLOYEE table. Like I want to know the ColumnName, ColumnType of column EID using XSJS APIs.

I can use a workaround like

 

var conn = $.db.getConnection();

var prepStatement = conn.conn.prepareStatement('SELECT * FROM EMPLOYEE');

var rs = prepStatement .executeQuery();

var meatadata = rs.getMetaData();

 

This would give me the ResultSetMetaData and I can call appropriate function to get the desired information. But, this doesn't feel quite right, does it? I mean doing a select on the table to retrieve the meta information. Please suggest some alternate approach. I have seen something similar being done in the SAP HANA's web based Catalog editor.

 

Thanks,

Vikash.


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>