anitnilay20 / anitnilay20/beatrix

Add UPDATE operation support for PostgreSQL

オープン
#4 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
high-priority postgres query-builder
主要言語
Rust
スター
1
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

## Description
Implement UPDATE functionality to allow modifying existing records in PostgreSQL.

## Requirements
- [ ] Implement UPDATE query builder
- [ ] Support WHERE clauses for targeted updates
- [ ] Handle partial updates (only changed fields)
- [ ] Add proper validation
- [ ] Write comprehensive tests

## Acceptance Criteria
- User can call `User::update().set(User::name(), "New Name").where_clause(User::id().eq(1)).execute(&db)`
- Support for conditional updates
- Proper handling of concurrent updates
- Return affected row count

## Files to modify
- `beatrix_core/src/relational/update.rs` (new file)
- `beatrix_core/src/relational/mod.rs`
- `beatrix_macro/src/relational.rs`

## Example Usage
```rust
let affected = User::update()
.set(User::name(), "John Doe".to_string())
.where_clause(User::id().eq(1))
.execute(&db).await?;
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。