Skip to content

Commit

Permalink
chore: update fn returns
Browse files Browse the repository at this point in the history
  • Loading branch information
dayvsonspacca committed Aug 21, 2024
1 parent 52aa472 commit 5904e76
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,8 @@ impl Insert {
/// ("manager_id", "1"),
/// ]);
/// ```
pub fn new(table: &str) -> Insert {
Insert {
pub fn new(table: &str) -> Self {
Self {
table: table.to_string(),
values: Vec::new(),
}
Expand Down Expand Up @@ -611,12 +611,9 @@ impl Where {
}

/// Adds a less than or equal condition (`field <= value`) to the WHERE clause.
pub fn less_than_equal(
&mut self,
field: &str,
value: &str,
) -> Result<&mut Self, SqlBuilderError> {
self.add_predicate(field, "<=", value)
pub fn less_than_equal(&mut self, field: &str, value: &str) -> &mut Self {
self.add_predicate(field, "<=", value).unwrap();
self
}

/// Adds a `IS NULL` condition (`field IS NULL`) to the WHERE clause.
Expand Down

0 comments on commit 5904e76

Please sign in to comment.