You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * Generates JS dataframe objects. * Supports base, polars frameworks. * @param {Object} tableData - Table data * @param {string[]} tableData.headers - headers * @param {any[][]} tableData.data - rows * @param {string[]} tableData.columnTypes - rows * */functioncreateSQLValues(tableData){const{ headers, data, columnTypes }=tableData;letcode='';/** * Formats a value according to its column type for R syntax * @param {any} value - The value to format * @param {number} colIndex - Column index for type lookup * @returns {string} Formatted value */functionformatValue(value,colIndex){if(value===''){return'null';}elseif(columnTypes[colIndex]==='string'){return`'${value}'`;}elseif(columnTypes[colIndex]==='numeric'){returnaddTrailingZeroes(value);}elseif(columnTypes[colIndex]==='boolean'){returnnormalizeBool(value,'python');}elseif(columnTypes[colIndex]==='integer'){returnvalue;}else{return`"${value}"`;}}code=`select * from (values\n\n`;data.forEach((row_j,j)=>{constvalues=row_j.map((row,i)=>formatValue(row,i)).join(', ');code+=` (${values})${j<data.length-1 ? ',\n' : '\n'}`;});code+=`) t (${headers})`;returncode;}
Hi @riziles. Thanks to @juarezr, we have finally implemented the SQL support. Could you please look at the development version and tell us if it works correctly or as you expected? You can access the development version from the CI artefacts or via this link.
Activity
atsyplenkov commentedon Apr 5, 2025
Nice! Can you please prepare a PR?
riziles commentedon Apr 5, 2025
I don't have all the VS Code extension stuff installed to test it. I just prototyped in vanilla js using StackBlitz:
https://stackblitz.com/edit/vitejs-vite-ee1ebsyv?file=index.html
atsyplenkov commentedon Apr 5, 2025
No worries, I'll take a look next week
atsyplenkov commentedon Sep 20, 2025
Hi @riziles. Thanks to @juarezr, we have finally implemented the SQL support. Could you please look at the development version and tell us if it works correctly or as you expected? You can access the development version from the CI artefacts or via this link.
riziles commentedon Sep 20, 2025
Sorry, I was blocked from downloading.