export const __webpack_esm_id__=99559;export const __webpack_esm_ids__=[99559];export const __webpack_esm_modules__={99559(){angular.module("graphdb.framework.rest.jdbc.service",[]).factory("JdbcRestService",t),t.$inject=["$http","$repositories","$translate"];const e="rest/sql-views";function t(t,n){return{getJdbcConfigurations:function(){return t.get(`${e}/tables`)},getJdbcConfiguration:function(n){return t.get(`${e}/tables/${n}`)},createNewJdbcConfiguration:function(e){return r("POST","",e)},updateJdbcConfiguration:function(e){return r("PUT",e.name,e)},deleteJdbcConfiguration:function(n){return t.delete(`${e}/tables/${n}`)},getColumnNames:function(n){return t.post(`${e}/columns`,n,{headers:{Accept:"application/json","Content-Type":"text/plain"}})},getColumnsTypeSuggestion:function(r,o){if(!Array.isArray(o))throw new Error(n.instant("jdbc.column.names.constraint"));return t({method:"POST",url:`${e}/types`,data:{query:r,column_names:o}})},getExistingSqlTablePreview:function(e,n){return t({method:"GET",url:`rest/sql-views/preview/${e}`,params:{limit:n}})},getNewSqlTablePreview:function(e,n){return t({method:"POST",url:"rest/sql-views/preview",contentType:"application/json; charset=utf-8",dataType:"json",data:e,params:{limit:n},headers:{Accept:"application/sparql-results+json"}})}};function r(n,r,o){return t({method:n,url:r?`${e}/tables/${r}`:`${e}/tables`,noCancelOnRouteChange:!0,data:{name:o.name,query:o.query,columns:o.columns||[]}})}}}};
//# sourceMappingURL=99559.a4f6de0606895fa13959.bundle.js.map