Code Monkey home page Code Monkey logo

Comments (4)

mchlrch avatar mchlrch commented on July 19, 2024

We also want to use the inspection to store a history of the source DB schema. To track and detect schema evolution (eg. new table columns got added). Simply by keeping a textual representation of the inspected DB schema in git. For this, a textual representation (independent of the DSL) should be dumped as well.

from xrm.

mchlrch avatar mchlrch commented on July 19, 2024

On branch feature-19 I added a new module com.zazuko.rdfmapping.dsl.sourceinspection with SerializationSample that shows how to use the Xtext serializer to turn a programmatically built-up AST (the EMF Object Model) into textual DSL output.

One not so practical way of running the sample outside of Eclipse is currently
mira@blinky:~/git/rdf-mapping-dsl/com.zazuko.rdfmapping.dsl.parent/com.zazuko.rdfmapping.dsl.sourceinspection$ mvn -q exec:exec -Dexec.executable="java" -Dexec.classpathScope="compile" -Dexec.args="-classpath %classpath com.zazuko.rdfmapping.dsl.sourceinspection.SerializationSample" > foobar-sources.xrm. This is particularly slow because the launch is using maven and is looking for updated dependencies etc.

Running the SerializationSample inside Eclipse is easy and fast.

The content of the generated DSL output file foobar-sources.xrm for this sample looks like this:
source-types { csv referenceFormulation "ql:CSV" } logical-source airport { source "http://www.example.com/Airport.csv" referenceables foo "fรถรถ" }

Right now the output is all on one line, because we haven't implemented formatting rules yet #10

The output is missing type csv in the logical-source. I didn't figure out yet what the issue is, that's causing this to fail. There's a TODO in the source related to this.

from xrm.

mchlrch avatar mchlrch commented on July 19, 2024

I'm shelving this to the backlog for now due to inactivity.

For a customer project, I used a more pragmatic ad-hoc approach in the meantime: Instead of using the serializer of the DSL, I explicitly generate output in DSL syntax. One advantage of this approach is flexibility, for example to easily serialize addititional metadata from the DB, like column datatypes and comments as // comments in the DSL output

from xrm.

mchlrch avatar mchlrch commented on July 19, 2024

https://github.com/nnamtug/spring-boot-maven-plugin-example

from xrm.

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.