The OpenD Programming Language

Row.opApply

Allows iteration over the columns with the foreach statement.

  1. int opApply(int delegate(string, DatabaseDatum) dg)
  2. int opApply(int delegate(DatabaseDatum) dg)
    struct Row
    int
    opApply
    (
    int delegate dg
    )

Meta

History

Prior to June 11, 2023 (dub v11.0), the order of iteration was undefined. It is now guaranteed to be in the same order as it was returned by the database (which is determined by your original query). Additionally, prior to this date, the datum was typed string. DatabaseDatum should implicitly convert to string, so your code is unlikely to break, but if you did specify the type explicitly you may need to update your code.

The overload with one argument, having just the datum without the name, was also added on June 11, 2023 (dub v11.0).