Using Slices as Statement Arguments

Sibyl accepts a collection of values (as a slice) as a single positional or a named argument. The primary target of this feature is to make passing arguments for IN-list parameters easier. However, as Sibyl simply unrolls a slice into consecutive arguments, this feature can also be "abused" :-) to pass multiple consecutive arguments of the same type when it is convenient.

Example

    let stmt = session.prepare("
        SELECT first_name, last_name, department_name, hire_date
          FROM hr.employees e
          JOIN hr.departments d
            ON d.department_id = e.department_id
         WHERE d.department_name IN (:departments, :2, :3, :4, :5)
           AND d.department_id IN (
                    SELECT department_id
                      FROM hr.employees
                  GROUP BY department_id
                    HAVING Count(*) >= :min_employees )
           AND hire_date BETWEEN :hire_range AND :8
      ORDER BY hire_date, department_name, last_name, first_name
    ")?;
    let date_from = Date::from_string("July      1, 2006", "MONTH DD, YYYY", &session)?;
    let date_thru = Date::from_string("December 31, 2006", "MONTH DD, YYYY", &session)?;

    let rows = stmt.query(
        (
            (":DEPARTMENTS",   ["Marketing", "Purchasing", "Human Resources", "Shipping", "IT"].as_slice()),
            (":MIN_EMPLOYEES", 5),
            (":HIRE_RANGE",    [date_from, date_thru].as_slice()),
        )
    )?;