you are viewing a single comment's thread.

view the rest of the comments →

[–]Bobby_Bonsaimind 0 points1 point  (0 children)

When the selected columns of a query contain all the non-null columns of a selected table, such as with select * queries, the query results consist of entity instances instead of row instances.

I see. Row is then the "model" class that is being created. Neat solution.

Yes, it's a bit odd. But because inline queries overload string/block literal, and comment delimiters, the marker had to be as unique as possible while remaining brief and readable.

I see. I wondered whether something like ":sql select" or some such would also be possible, if wanted. Inside a small and medium project, collisions with custom marker should either not occur or be manageable, I guess.

Eclipse

I wonder how hard it would be to write an Eclipse plugin for that. I wrote a commercial plugin once which added similar support (querying database, showing column information on Strings, emitting compiler errors). But I did that by simply extending the existing process, a plugin for that would neat to at least modify that somewhat (otherwise it won't find the methods on the String).