Closed Bug 387945 Opened 18 years ago Closed 17 years ago

Named parameter support in C++

Categories

(Core :: SQLite and Embedded Database Bindings, defect)

defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Waldo, Unassigned)

References

Details

Named parameters are significantly more flexible and far less prone to developer error than indexed parameters. From what I understand, JS supports named parameters, but if C++ doesn't, one of the more dangerous places for errors in parameter binding is being overlooked.
Depends on: 388048
Depends on: 388059
The Tuple interface in Bug 435994 provides a good way to do this, although using nsIVariants won't be so pleasant in C++. Won't be so bad with XPCOMGC...
mozIStorageStatement has a getColumnIndex method that takes a name. With this, you can then bind on index. Future APIs will be designed with named columns in mind, but as far as I'm concerned this bug is WORKSFORME.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
Product: Toolkit → Core
You need to log in before you can comment on or make changes to this bug.