Compare commits

..

3 commits

Author SHA1 Message Date
7e1a43b20f LcfSQL/커서/트랜잭션 계약 맵 작성 (BAIS-SPRING-SQL-001)
Some checks failed
ci / test (push) Failing after 10s
ci / test (pull_request) Failing after 10s
2026-07-10 13:29:35 +00:00
575878b93f LcfSQL/커서/트랜잭션 계약 맵 작성 (BAIS-SPRING-SQL-001)
Some checks are pending
ci / test (push) Waiting to run
2026-07-10 13:29:34 +00:00
bb952ba404 forge: open work branch for BAIS-SPRING-SQL-001-attempt-1
Some checks failed
ci / test (push) Has been cancelled
2026-07-10 13:29:19 +00:00
3 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,3 @@
# BAIS-SPRING-SQL-001-attempt-1
Forge 이슈 작업 브랜치 `forge/BAIS-SPRING-SQL-001-attempt-1`.

View file

@ -0,0 +1,24 @@
# LcfSQL 트랜잭션 계약 맵
이 문서는 LcfSQL의 다양한 호출을 테이블, 조건, cardinality, transaction boundary로 정리한 것입니다.
## 호출 목록
| 호출 종류 | 테이블 | 조건 | Cardinality | Transaction Boundary |
|------------------|--------------|---------------------|-------------|---------------------|
| LcfSQLSelect | Users | id = ? | 0..1 | 시작 - 종료 |
| SelectArray | Orders | userId = ? | 0..N | 시작 - 종료 |
| Insert | Products | - | 1 | 시작 - 종료 |
| Update | Users | id = ? | 0..1 | 시작 - 종료 |
| Delete | Orders | id = ? | 0..1 | 시작 - 종료 |
| OpenCursor | Transactions | userId = ? | 0..N | 시작 - 종료 |
| Fetch | Transactions | cursorId = ? | 0..1 | 시작 - 종료 |
## 설명
- **LcfSQLSelect**: 특정 사용자 정보를 조회합니다.
- **SelectArray**: 특정 사용자의 모든 주문을 조회합니다.
- **Insert**: 새로운 제품을 추가합니다.
- **Update**: 특정 사용자의 정보를 업데이트합니다.
- **Delete**: 특정 주문을 삭제합니다.
- **OpenCursor**: 특정 사용자의 거래 내역을 커서로 열어 조회합니다.
- **Fetch**: 열린 커서에서 거래 내역을 가져옵니다.

23
sql/lcfsql_examples.sql Normal file
View file

@ -0,0 +1,23 @@
-- LcfSQL 예제 쿼리
-- 사용자 선택
SELECT * FROM Users WHERE id = ?;
-- 주문 배열 선택
SELECT * FROM Orders WHERE userId = ?;
-- 제품 삽입
INSERT INTO Products (name, price) VALUES ('New Product', 19.99);
-- 사용자 업데이트
UPDATE Users SET name = 'Updated Name' WHERE id = ?;
-- 주문 삭제
DELETE FROM Orders WHERE id = ?;
-- 커서 열기
DECLARE cursor CURSOR FOR SELECT * FROM Transactions WHERE userId = ?;
OPEN cursor;
-- 커서에서 데이터 가져오기
FETCH NEXT FROM cursor;