Loading ...
Sorry, an error occurred while loading the content.

187Re: [extremeperl] HaskellDB, static typing, combinators, and ObPerl

Expand Messages
  • Shae Matijs Erisson
    Mar 31, 2005
    • 0 Attachment
      Rob Nagler <nagler@...> writes:

      > Here's our language for defining SQL queries in Perl for our domain:
      >
      > {
      > version => 1,
      > can_iterate => 1,

      <snip code>

      HaskellDB allows higher-order database queries, and I don't think this does.
      I used to work with multi-page SQL queries in some trust management code.
      We always wished for some way to pass one bit of SQL as the parameter to
      another bit of SQL. HaskellDB allows that ( see test/higher-order.hs )
      and checks that the resulting relational query is somewhat sane.
      One advantage of combinators is that they can be composed with each other.

      > We don't end up with legal SQL, because the definition of what is
      > legal depends on the run-time binding to the database vendor we are
      > using. That's on reason why we defer errors to the SQL interpreter
      > and avoid parsing any SQL in our library. (Our model allows you to
      > inject SQL directly at different points in the processing.)

      SQL is still one step away from relational operations.
      You could directly output the relational operations you're producing and turn
      that into SQL for each backend, and you'd be able to do some sanity checks in
      the process.
      --
      Programming is the Magic Executable Fridge Poetry, | www.ScannedInAvian.com
      It is machines made of thought, fueled by ideas. | -- Shae Matijs Erisson
    • Show all 3 messages in this topic