Slashdot Mirror


Type Safety Coming To DB Queries

An anonymous reader writes "A new type-safe query language for the popular full-text search platform Solr, called Slashem (a Rogue-like), has just been released. Slashem is implemented as a domain-specific language in Scala, providing compile time type-safety, allowing you do things like date range queries against date fields but keeping you from trying to do a date range query against a string field. Hopefully this trend catches on, resulting in fewer invalid queries exploding at runtime."

6 of 128 comments (clear)

  1. Gibberish - wrapped up as geekspeak by Anonymous Coward · · Score: 4, Insightful

    It's rogue-like and the link to define "rogue" is to a fucking github page that says "lift/mongodb query dsl".

      For fuck's sake... this tells people NOTHING. It's a completely useless article submission.

    1. Re:Gibberish - wrapped up as geekspeak by Samantha+Wright · · Score: 5, Funny

      This exactly.

      The server hits you with its internal schema!
      You cast SELECT * FROM ut_f81 INNER JOIN ut_f81 alt_ut_f81 ON alt_ut_f81.globalid = ut_f81.rrn / 2 WHERE (SELECT * FROM ut_f81 INNER JOIN ut_f81 alt_ut_f812 ON alt_ut_f812.globalid = alt_ut_f81.rrn / 2 WHERE (SELECT * FROM ut_f81 INNER JOIN ut_f81 alt_ut_f813 ON alt_ut_f813.globalid = ut_f81.rrn / 2 WHERE (SELECT 1 FROM ut_f81) = 1) = 1) = 1
      The server freezes, taking all of your work with it!

      Do you want your possessions identified?

      --
      Bio questions? Ask me to start a Q&A journal. Computer analogies available for most topics!
  2. Slashem, a roguelike by Xgamer4 · · Score: 5, Insightful

    ...Well, there's a namespace collision. There's Slashem and roguelike as referenced in the summary, and Slash'em and Roguelike as-in the Nethack-based game and the game genre. There's no way that wasn't intentional, and whoever's brilliant idea it was needs to be shot.

  3. LINQ by bondsbw · · Score: 4, Interesting

    The title is incorrect; type safety is already available in DB queries, at least on Windows clients. You can use LINQ directly in C# and VB, or standalone via LINQPad.

    I'm all for new languages... but IMHO, I think LINQ is better. It looks more like SQL for all of us who already know SQL. It reads in the most logical order for word completion (select is after from/where, not before). And it's very carefully built on top of pure functional structures (SelectMany is equivalent to monadic Bind).

    --
    All my liberal friends think I'm a conservative, all my conservative friends think I'm a liberal.
  4. WTH? by Blakey+Rat · · Score: 4, Funny

    I think that description might have been CleverBot making an attempt on the Turing Test. What the hell?

  5. I don't understand... by Chris+Mattern · · Score: 4, Funny

    How will getting the Amulet of Yendor get me type safety?