anitnilay20 / anitnilay20/beatrix

Complete INSERT operation support for PostgreSQL

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

説明

## Description
Currently, Beatrix only supports SELECT operations for PostgreSQL. We need to implement INSERT functionality to allow creating new records.

## Requirements
- [ ] Implement INSERT query builder
- [ ] Add INSERT method to Select struct
- [ ] Support batch inserts
- [ ] Handle primary key generation
- [ ] Add proper error handling
- [ ] Write comprehensive tests

## Acceptance Criteria
- User can call `User::insert().values(user).execute(&db)`
- Support for single and batch inserts
- Proper handling of auto-increment fields
- Detailed error messages for constraint violations

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

## Example Usage
```rust
let user = User { name: "John".to_string(), email: "john@example.com".to_string() };
let result = User::insert().values(user).execute(&db).await?;
```

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

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

評価

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

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

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