Real example. Tutorial request.
Hello,
Can someone guru of MPS help me realize follow sample.
Everyone know that program operate with JDBC. I like to use MPS to generate
database stubs to asses into database.
Now i must create wrapers for it. Will be very nice to have such functions
as 'inline operators'.
select t.id as int id, t.name as String name, t.phoneNumber as String phoneNumber from userinfo t { System.out.println(id + ": " + name + "(" + phoneNumber + ")"); }
Is i loop, with variable definitions and automatical call into JDBC.
Please, describe common concepts and steps to make it sample?
Thanks!
--
Alexey Efimov, Java Developer
Tops BI
Please sign in to leave a comment.
Alexey Efimov wrote:
You may start from creating new Concept SelectStatement that extends
Block concept from BaseLanguage. I think it should contain StatementList
node as child and some nodes to represent parameter. You language is
baseLanguage extension. For more examples you can look at
CollectionLanguage project under MPS_HOME/languages/collectionLanguage.
Ops :-)
Thanks anyway :-)
Alexey, this extension is difficult to do. You're going to pass block of code as parameter. I suggest you to wait with it until we have an example of such.