JSON에서 PostgreSQL 쿼리 빌더
JSON 데이터를 붙여넣고, 필요한 필드를 시각적으로 선택하고, PostgreSQL JSONB 쿼리를 즉시 생성합니다. 화살표 표기법과 경로 함수를 지원합니다.
PostgreSQL JSONB Operators
->Get JSON object field (returns JSON)->>Get JSON object field as text#>Get JSON at path (returns JSON)#>>Get JSON at path as text@>Contains (for filtering)?Key exists check사용 시기
- PostgreSQL JSONB 열에 저장된 중첩 JSON 쿼리
- 구문을 외우지 않고 복잡한 추출 쿼리 빌드
- JSON 데이터로 NoSQL에서 PostgreSQL로 마이그레이션
- PostgreSQL JSONB 연산자 및 함수 학습
프로 팁
- 텍스트 추출에는 ->> 사용 (WHERE 비교에 필요)
- -> 연산자는 JSON을 반환하고, ->>는 텍스트를 반환
- GIN 인덱스는 @> 포함 쿼리에 가장 잘 작동
- 깊게 중첩된 데이터에는 경로 함수가 더 읽기 쉬움
JSON to PostgreSQL Query Builder - 기술 세부 정보
PostgreSQL provides powerful JSONB support for storing and querying JSON data. The -> operator returns JSON, while ->> returns text. For nested paths, use #> and #>> or the jsonb_extract_path functions. This tool helps you build these queries visually without memorizing the syntax.
명령줄 대안
-- Arrow notation
SELECT data->'user'->>'name' FROM users;
-- Path function
SELECT jsonb_extract_path_text(data, 'user', 'name') FROM users;
-- Containment query (uses GIN index)
SELECT * FROM users WHERE data @> '{"status": "active"}';