1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:07:34 +00:00

LibSQL: Implement converting float and tuple values to a boolean

This commit is contained in:
Timothy Flynn 2022-02-11 09:43:02 -05:00 committed by Linus Groh
parent 8fab99e920
commit e13c96157c
3 changed files with 32 additions and 2 deletions

View file

@ -159,7 +159,7 @@ public:
[[nodiscard]] String to_string() const;
[[nodiscard]] Optional<int> to_int() const;
[[nodiscard]] Optional<double> to_double() const;
[[nodiscard]] static Optional<bool> to_bool() { return {}; }
[[nodiscard]] Optional<bool> to_bool() const;
[[nodiscard]] static bool to_vector(Vector<Value>&) { return false; }
void assign(Value const&);
void assign_string(String const&);
@ -250,6 +250,7 @@ public:
[[nodiscard]] size_t length() const;
[[nodiscard]] bool can_cast(Value const&) const;
[[nodiscard]] int compare(Value const& other) const;
[[nodiscard]] Optional<bool> to_bool() const;
virtual bool validate_before_assignment(Vector<Value> const&) override;
virtual bool validate(BaseTypeImpl const&) override;