GithubHelp home page GithubHelp logo

Comments (10)

rvansa avatar rvansa commented on August 11, 2024 1

@JacksonIsaac As I've said above, a separate REST endpoint in SchemaService that would run SELECT jsonb_path_query_first('{}', path) and see if that throws any error, and report that back to Horreum.

On the UI side that would be Schema.tsx where you'd fire the request 1 second after jsonpath change.

I think that the best first step would definitely be getting Horreum running locally to see the UI for yourselves. If you're using podman instead of docker, I've just created a compatible definition for that as well - please see README.

from horreum.

JacksonIsaac avatar JacksonIsaac commented on August 11, 2024

Working on this :)

from horreum.

JacksonIsaac avatar JacksonIsaac commented on August 11, 2024

I am currently looking at SchemaService.java#L274. Is this the correct place to add this check ? I am still trying to figure out how this syntax validation will be done.

I also assume that the check has to be done on extractor variable (line 316) ?

from horreum.

rvansa avatar rvansa commented on August 11, 2024

Hi @JacksonIsaac , that was quick :) Are you already using Horreum?

Actually I had in mind a separate endpoint, checking the query as I type (with minor delay, e.g. 1 second, to prevent bombarding the server with every letter).

from horreum.

JacksonIsaac avatar JacksonIsaac commented on August 11, 2024

I haven't used Horreum, but just tried to read the code to understand what's going on. So let me know what you had in mind, and I'll follow up from there.

from horreum.

rvansa avatar rvansa commented on August 11, 2024

@JacksonIsaac Hi, any progress? Have you managed to set up Horreum or do you have any issues?

from horreum.

JacksonIsaac avatar JacksonIsaac commented on August 11, 2024

Hi @rvansa, I was able to setup Horreum and access the UI. I was looking at adding a @post api in SchemaService (called maybe validate_schema), but I wasn't sure how the sql query would execute from there

from horreum.

rvansa avatar rvansa commented on August 11, 2024

@JacksonIsaac SchemaService has injected EntityManager em and AgroalDataSource dataSource fields; You can either run a native query through the former one or use JDBC directly on the latter. Since the query does not access any data nor modifies anything you do not need to wrap it with

try (CloseMe h = sqlService.withRoles(em, identity)) { ... }

as other DB calls in the class do.

from horreum.

rvansa avatar rvansa commented on August 11, 2024

@JacksonIsaac Was ^ helpful? If you're still unsure, you can reach me online on Zulip

from horreum.

rvansa avatar rvansa commented on August 11, 2024

Implemented in 54eaa76

from horreum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.