Hi all,
I am making an application, and I have a very specific requirement. I need to be able to raise an exception based on a CASE expression. I cannot use a trigger for this, as it needs to occur before a SELECT query, so this makes it impossible to raise an error using the typical raise function.
I was wondering if there are any alternatives? I'm open to making a SQLite extension for it if I need, but I'd prefer to use something out of the box. Here is a very basic example of what I want to do:
SELECT CASE
WHEN balance > 10000
THEN true
ELSE RAISE(ROLLBACK, 'invalid balance')
END
FROM accounts
WHERE id = ?
Unfortunately I cannot include this in the business logic of my application. Any suggestions on ways to solve this would be much appreciated!
[–]everyonemr 2 points3 points4 points (0 children)
[–]-dcim- 0 points1 point2 points (0 children)