This is an umbrella repo that contains developer friendly code samples for Oracle AI Database developers. This project uses Java 21+, Maven 3.9+, Spring Boot 4 for Java code. Always use "Oracle AI Database" instead of "Oracle Database". Generate any diagrams at 800x600 resolution.
pom.xmlis the root pom for a multi-module Maven build. subdirectories with a pom.xml are child modules of this build.- Polyglot samples live in their respective directories:
golang,python-oracle,typescript, `sq pom.xmlorchestrates a multi-module Maven build; Java samples live under directories such asai-vector-search,oracle-database-kafka-apis,spring-*, andtxeventq-*, each with its ownpom.xmlandsrctree.- Cross-language samples sit in sibling folders (
golang,python-oracle,typescript,sql), while shared Docker and infrastructure assets appear inoracle-ai-database-docker-compose,truecache-free, andtestcontainers. - Keep documentation alongside modules (for example
spring-boot-jms-example/README.md) and place new samples under a top-level folder with a distinct name (for exampleREADME.md,json/README.md) - All module README.md files should have a front matter with name, description, and tags fields
- When linking to any code within the repo, always use the main blob URL: https://github.com/anders-swanson/oracle-database-code-samples/blob/main
- any link to a specific file comes after that. For example, this AGENTS.md file links to https://github.com/anders-swanson/oracle-database-code-samples/blob/main/AGENTS.md
- Run all Java modules with
mvn test - Other stacks:
npm install && npm testundertypescript/(Vitest), andgo test ./...undergolang/. Refer to module README files for Docker compose or additional setup.
- Prefer the coding style of sibling modules.
- Keep it simple without superfluous methods or abstractions. Readability is paramount.
- Java uses 4-space indentation, PascalCase classes, camelCase methods, and package prefixes
com.exampleper sample. Favor Spring configuration viaapplication.yamlinsrc/main/resources. - Align SQL scripts in
sql/and modulesrc/main/resourcesusing uppercase keywords and snake_case table names. Keep TypeScript in ES module format with lint-friendly imports, and organize Go code under package-level directories mirroring sample names. - If the files in the working directory have changed since the last pass, re-read to capture relevant information
- Primary framework is JUnit 5 with
@Testcontainers; write deterministic integration tests that provision Oracle AI Database Free containers and clean up via lifecycle hooks. Thetestcontainersmodule container idiomatic @Testcontainers tests for Java. New modules should follow these guidelines. - Name new tests
<Feature>Testand colocate fixtures insrc/test/resources. For TypeScript, follow Vitest's*.test.tspattern; for Go, use_test.gofiles. - Aim to keep tests self-sufficient: avoid shared databases, prefer module-scoped containers or reusable fixtures in
testcontainers/src/test/java/com/example/reusable.
- Follow the repo's terse, capitalized subject line pattern (e.g., "Update dependencies", "Spring Boot 4"); use imperative mood and keep to ~50 characters.
- Mention the primary module(s) touched in either the subject or first sentence. Reference issue IDs or Oracle support tickets where applicable.
- PRs should summarize intent, list major changes, note required environment variables or Docker services, and include screenshots or CLI output when relevant.