Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
619 commits
Select commit Hold shift + click to select a range
f40bd48
反序列化时忽略掉不认识的属性
jackytin Jun 15, 2024
dad3e11
ignore the unkown properties .
jackytin Jun 15, 2024
75c6b28
Merge branch 'main' of github.com:teaql/teaql-spring-boot-starter
jackytin Jun 15, 2024
d1cdc4d
update user context, view render
jackytin Jul 29, 2024
e8eabfb
update user context, view render
jackytin Jul 29, 2024
1dad97b
fix duplicate in sub type id fk ensure
jackytin Sep 24, 2024
d95b07c
error messsage and del req in view render
jackytin Sep 25, 2024
52f2413
error messsage and del req in view render
jackytin Sep 25, 2024
5699bb1
redis template object json
jackytin Sep 25, 2024
3b29989
fix not operatro
jackytin Sep 25, 2024
a17debb
add direct view support
jackytin Sep 25, 2024
c8820d8
use DefaultTyping.EVERYTHING for redis object value
jackytin Sep 25, 2024
dc14bfb
fix error message
jackytin Sep 26, 2024
8de4741
add validate for save or delete action
jackytin Nov 14, 2024
171afb8
add validate for save or delete action
jackytin Nov 14, 2024
3c8f558
add pre action for save and delete
jackytin Nov 14, 2024
7bd7b08
add shot request/shot response log
jackytin Nov 14, 2024
f64eade
fix typo
jackytin Nov 14, 2024
1b3b9e3
add task runner
jackytin Nov 21, 2024
f1555a3
add task runner
jackytin Nov 21, 2024
a1c0aec
add update on entity
jackytin Nov 21, 2024
f334283
fix update null property on entity
jackytin Nov 22, 2024
e39769c
add excel block
jackytin Nov 24, 2024
ec17a8f
base service update
jackytin Nov 25, 2024
a6a4610
update list candidates
jackytin Dec 18, 2024
45ea2b8
update local storage in user context
jackytin Dec 23, 2024
fe35bb8
add eq/hascode impl
jackytin Dec 25, 2024
fddf500
add aggregation cache for repository
jackytin Dec 25, 2024
dfc518e
add capacity for global cache
jackytin Dec 25, 2024
3ff9101
add aggrate cache recursively
jackytin Dec 26, 2024
37d7f16
Update gradle-publish.yml
jackytin Dec 26, 2024
e41131f
add local deploy support
jackytin Dec 26, 2024
8f1c21a
Merge branch 'main' of github.com:teaql/teaql-spring-boot-starter
jackytin Dec 26, 2024
1d2b952
fix multi update version
jackytin Jan 18, 2025
be102f2
fix multi update version
jackytin Jan 18, 2025
25d8ed9
add blob object support
jackytin Jan 20, 2025
d066011
add blob object support
jackytin Jan 20, 2025
38857a4
check real updated properties for entity update
jackytin Jan 23, 2025
a4aa7d5
replace redis template with redisson
jackytin Feb 7, 2025
a374907
update repo
jackytin Feb 7, 2025
8deb198
add local/distribute lock support
jackytin Feb 8, 2025
93f2761
add local/distribute lock support
jackytin Feb 8, 2025
c3af647
fix colum name
Mar 4, 2024
18cc893
🚀optimize error message
Mar 19, 2025
45160b1
🚀optimize the execute code error report
Mar 19, 2025
6cde0c6
🚀Add when for consumer
Mar 19, 2025
5fecd5c
🚀fix search for list count issue
Mar 20, 2025
f1f6c72
🚀fix getRemoteAddress
Mar 24, 2025
f7cfe15
🚀add make file
Mar 24, 2025
afb4236
add request raw sql/raw sql critiral/raw sql select support for sear…
Mar 22, 2025
bdbba69
🚀use internalComment for other request comment
Mar 25, 2025
21e0afd
code cleanup and format
Mar 29, 2025
034711e
code cleanup and format
Mar 29, 2025
a40ebf5
🚀change user context to allow reinject resolver
Apr 18, 2025
379316b
🚀done
Apr 19, 2025
3933bff
add type on checker
May 20, 2025
5bbec91
auto select parent when enhance children, sql repository add canMixi…
Jun 28, 2025
1778763
164 release
Jun 28, 2025
88b1af4
🚀fix mysql alter issue
Sep 25, 2025
9f82505
🚀add mysql FK generation when ensuring tables
Sep 29, 2025
81d496a
🚀use CODE_AS_IS fro constant
Oct 15, 2025
205af6c
🚀add alter column for sqlite
Oct 19, 2025
a37cc80
🚀optimize the code, use inherit from BaseLanguageTranslator
Oct 21, 2025
b22e431
🚀traditional chinese is done
Oct 21, 2025
76e7142
🚀Adjust language support
Oct 21, 2025
26b6026
Checker needCheck updated.
Nov 28, 2025
a4419e7
make redis optional in autoconfig module
Dec 6, 2025
7a96d38
add configration in embedded
Dec 6, 2025
34c4e9e
🚀fix sqlite issue
Dec 8, 2025
1d37047
🚀Add prefix to aggr functions
Dec 26, 2025
8d5d3c4
add rawsql for property
Dec 26, 2025
3a05d6d
🚀upgrade 184
Dec 26, 2025
ccf5ec0
🚀save for delete
Jan 12, 2026
4b8a1bc
🚀Adding orElse, orElse throw to expression
Jan 15, 2026
81c6211
add facet request
May 19, 2026
74c9817
Merge pull request #1 from teaql/add-facet-support
philipgreat May 19, 2026
6af197f
Rename request submit policy hook
May 21, 2026
59e2266
Fix WebResponse data serialization
May 22, 2026
2103b97
Rename single query execution API
May 23, 2026
1293d4e
🚀fix sqlite multiple connection issue
May 23, 2026
78ec78d
Fix SQLite data source wrapping
May 24, 2026
2e19926
Merge pull request #2 from teaql/codex/fix-sqlite-single-connection-wrap
philipgreat May 24, 2026
6ac64cc
Fix SQLite data source wrapping
May 24, 2026
20c93b3
🚀add readme and change the license to apache2
May 24, 2026
c9d4446
Enable SQL select logging by default
May 24, 2026
8027775
feat: expose facets api on SmartList and add facets to WebResponse
May 25, 2026
ac1e013
chore: remove github actions workflows
May 25, 2026
f4041fe
feat: include SearchRequest comment in SQL logger output via MDC
May 25, 2026
25a1c14
feat: align query comment log formatting with rust version using [] b…
May 25, 2026
123319b
chore: update publication repository to maven.teaql.io and bump versi…
May 25, 2026
de87d20
feat: complete dynamic i18n parameter checks and test cases
May 26, 2026
23b6b12
feat: decouple Hutool calls into a new teaql-utils module and migrate…
May 26, 2026
5c4c9b3
test: add comprehensive unit tests for teaql-utils and implement RowK…
May 26, 2026
8ec4805
test: greatly expand teaql-utils unit tests to cover 24 test cases an…
May 26, 2026
a78fc58
test: add exceptional flows and fallback unit tests for TypeReference…
May 26, 2026
120ecd4
test: implement dedicated happy-path and exceptional-flow unit tests …
May 26, 2026
ff4f165
refactor: completely replace cn.hutool backend with Google Guava, Apa…
May 26, 2026
b675675
refactor: completely replace Gradle build system with Maven multi-mod…
May 26, 2026
7f92a06
release: bump project version to 1.195-RELEASE for deployment
May 26, 2026
0d0d1b7
feat: implement dynamic SQL trace comments with user identity in Java…
May 26, 2026
68cdfaf
feat: internalize runtime boundary
May 27, 2026
79a352f
fix: strip all SQL identifier quotes and normalize case in schema mig…
May 27, 2026
71100a5
fix: remove stale getPureColumnName overrides in database subclasses
May 27, 2026
f783317
fix: add correct DDL syntax overrides for Oracle, HANA, and DB2
May 27, 2026
8443605
fix: resolve ensureSchema issues across SQLite, Snowflake, MSSQL, and…
May 27, 2026
898942d
feat: implement unified graph mutation engine with cycle detection an…
Jun 1, 2026
cc9d4e6
feat: Phase 1 Triple-Intent runtime enforcement — purpose() on querie…
Jun 5, 2026
6a53fc1
test: add TripleIntentEnforcementTest — 11 cases covering all enforce…
Jun 5, 2026
a2392dc
feat: make Triple-Intent error messages AI-actionable with fix code e…
Jun 5, 2026
6f6d5eb
Merge pull request #3 from teaql/feature/java-triple-intent
philipgreat Jun 5, 2026
17676cd
chore: bump version to 1.197-RELEASE
Jun 5, 2026
a61d177
refactor(expression): introduce resolve() helper in Expression interf…
Jun 5, 2026
29e481f
chore: bump version to 1.198-RELEASE
Jun 5, 2026
b9a7247
feat: add searchForText to SearchRequest and BaseRequest
Jun 6, 2026
3df20df
Merge pull request #4 from teaql/feature/java-triple-intent
philipgreat Jun 6, 2026
59b8d2a
chore: remove gradle configuration and cache files, update .gitignore
Jun 7, 2026
21b8239
v6.0.0: modular refactor with JPMS, Android support, Rust alignment
Jun 10, 2026
26bdc20
rename: teaql-spring-boot-starter → teaql-java
Jun 10, 2026
f98e202
feat: add Quarkus and Micronaut modules
Jun 10, 2026
c467a23
docs: translate all Chinese comments to English
Jun 10, 2026
5625c9e
change module name from teaql-android to teaql-sqlite-pure, this modu…
Jun 11, 2026
4049db2
docs: define data service provider architecture
Jun 12, 2026
ad60547
docs: separate internal id generation from data service
Jun 12, 2026
63243c7
docs: clarify core runtime module boundaries
Jun 12, 2026
6e2dbcc
docs: define teaql core class boundary
Jun 12, 2026
97eaa06
Refactor TeaQL: Introduce zero-reflection architecture and support mu…
Jun 13, 2026
4d7cc7f
feat: Implement parameterized LIMIT/OFFSET pagination, robust log rot…
Jun 13, 2026
f86824a
feat: Implement SPI-based module auto-assembly and ultra-fast UserCon…
Jun 13, 2026
70b1114
docs: Add performance baseline testing results to RUNTIME_DESIGN.md
Jun 13, 2026
16f8b6e
docs: Detail the Federated Data Routing and DataServiceRegistry archi…
Jun 13, 2026
9ba3c85
docs: Add Lambda-based Routing Strategy for complex dynamic data sources
Jun 13, 2026
5698d09
docs: Add Lambda code examples for RWS and Multi-Tenant routing
Jun 13, 2026
ea618f5
feat: add EntityMetaAssembler interface
Jun 13, 2026
0633996
chore: release version 1.500-RELEASE
Jun 14, 2026
5a4f525
chore: update distributionManagement url to maven.teaql.io
Jun 14, 2026
3a47f8d
fix(sql): implement facet query execution and fix NPE in buildAggrega…
Jun 14, 2026
20efd9f
fix(facet): respect full return parameter to not filter missing relat…
Jun 14, 2026
86a5db5
fix(facet): apply parent criteria to relation when mergeCriteria is true
Jun 14, 2026
4bd4db0
fix: flatten entity lists for IN operator and bump version to 1.505-R…
Jun 14, 2026
c445c77
Fix status relation hydration missing in PortableSQLDataService and b…
Jun 14, 2026
02eaa4a
chore: bump version to 1.507-RELEASE and revert jdbc string mapping hack
Jun 14, 2026
97b0264
chore: bump version to 1.508-RELEASE
Jun 14, 2026
c4c94fb
Merge pull request #5 from teaql/fix/schema-foreign-key-types
philipgreat Jun 14, 2026
cc8c2d8
fix: correct reverse relation type to SmartList in EntityDescriptor
Jun 14, 2026
f7c2be3
feat: add findWithJson to BaseRequest, fix IN clause array binding, b…
Jun 14, 2026
c77e23c
fix(runtime): push both purpose and comment into Execution trace chain
Jun 14, 2026
d186562
build: bump version to 1.512-RELEASE
Jun 14, 2026
6d503fb
feat: replace temporary JSON search with DynamicSearchHelper
Jun 14, 2026
54da8b2
build: bump version to 1.513-RELEASE
Jun 14, 2026
e7cf99a
Fix MySQL schema creation <max> varchar syntax
Jun 15, 2026
8b97c10
Fix DM8 schema creation <max> varchar syntax
Jun 15, 2026
7f0180f
Add integration test reports and READMEs
Jun 15, 2026
9dd6ec3
Add SQLite integration test report and README
Jun 15, 2026
755563f
Fix Oracle compatibility issues: JDBC case sensitivity, dialect parti…
Jun 15, 2026
de5006b
Add integration test reports and README links for tested database mod…
Jun 15, 2026
14fec5e
Add DM8 test report and README
Jun 15, 2026
56ba5f6
Add DuckDB test report and README, and fix VARCHAR max length
Jun 15, 2026
5364ba1
Rename teaql-duck module to teaql-duckdb
Jun 15, 2026
db32234
Bump version to 1.514-RELEASE
Jun 15, 2026
b7ffdf0
Bump version to 1.515-RELEASE
Jun 15, 2026
526afcd
Remove versionsBackup files
Jun 15, 2026
01f4a2f
chore: remove temporary script files
Jun 16, 2026
521ef91
chore: bump version to 1.516-RELEASE
Jun 16, 2026
89a594d
docs: update README version to 1.516-RELEASE
Jun 16, 2026
4b2fc9b
chore: remove residual hutool comments from tests
Jun 16, 2026
327820c
feat: implement JPMS SPI based agent tool sandbox and update architec…
Jun 16, 2026
38a2231
docs: introduce AI-native runtime positioning and the five safeguards
Jun 16, 2026
9627505
chore: ignore python files
Jun 21, 2026
f157c90
feat(runtime): default holographic trace log with zero-code debugging…
Jun 23, 2026
720010f
chore: bump version to 1.517-RELEASE
Jun 23, 2026
9b35cfe
feat: use TEAQL_DOMAIN for default log file name fallback
Jun 23, 2026
cc67dc6
chore: bump version to 1.518-RELEASE
Jun 23, 2026
c72fdfc
Merge pull request #6 from teaql/20260623-default-holographic-trace-l…
philipgreat Jun 23, 2026
d4168ce
docs: add LOGGING_DESIGN.md for zero-code logging configuration
Jun 23, 2026
cda056f
feat(log): implement unified zero-code logging configuration design
Jun 23, 2026
01b8628
chore: bump version to 1.519-RELEASE
Jun 23, 2026
3a8bae2
Document dynamic fields design
Jun 22, 2026
e9fa89d
Refine TeaQL core and runtime module boundaries
Jun 23, 2026
c503a70
Document refined TeaQL module boundaries
Jun 23, 2026
d492e3b
Add context tools policy registry
Jun 23, 2026
3acaebe
Split optional utils modules from core
Jun 24, 2026
747c704
Remove reference modules and lock down no-reflection paths
Jun 24, 2026
36d0120
Merge pull request #7 from teaql/clean-core-runtime-boundaries
philipgreat Jun 24, 2026
249f3ce
Document module selection matrix
Jun 24, 2026
adaf6a1
chore: fix maven compiler warning for JDK 17 module boundaries and in…
Jun 24, 2026
ba7919e
refactor: replace setter methods with updateXxx() pattern in all test…
Jun 24, 2026
d87054b
fix: trace chain order (why->what) and add shutdown hook to LogManage…
Jun 24, 2026
f790c94
chore: bump version to 1.521-RELEASE
Jun 24, 2026
34c1d31
Remove Gradle wrapper files
Jun 25, 2026
7af9e09
fix: resolve 7 architectural issues identified in review
Jun 25, 2026
766b349
docs: fix dynamic fields design doc against actual codebase
Jun 25, 2026
3abf4c0
feat: implement Dynamic Fields Phase 1 - API module and core bridge p…
Jun 25, 2026
a14c3e1
feat: add InMemoryDynamicFieldsProvider and DefaultDynamicFieldsFacade
Jun 25, 2026
136b393
docs: add README for teaql-dynamic-fields-api module
Jun 25, 2026
a937f20
feat: add teaql-dynamic-fields-jdbc module - JDBC-based persistent pr…
Jun 25, 2026
3ebe1b7
refactor: delegate ID generation to DynamicFieldContext.nextId()
Jun 25, 2026
78933b3
docs: add JDBC module README, update API README for JDBC completion
Jun 25, 2026
9c78197
feat(core): implement common ID generator
Jun 25, 2026
10285e1
feat: add BusinessIdGenerator and JDBC implementation
Jun 28, 2026
bde32b8
Merge pull request #8 from teaql/2026-06-26-implement-common-id-gener…
philipgreat Jun 28, 2026
beece53
refactor: rename internalSet and internalGet to __internalSet and __i…
Jun 30, 2026
50e2448
chore: bump version to 1.523-RELEASE
Jun 30, 2026
9798587
refactor: eliminate all else blocks — zero else as framework principle
Jul 4, 2026
c5c9fbf
refactor: extract ternary expressions into overridable methods
Jul 4, 2026
4acc02b
Merge pull request #9 from teaql/20260704-eliminate-else-blocks
philipgreat Jul 9, 2026
9907bd5
docs: clarify TeaQL Java runtime positioning
Jul 1, 2026
e669598
feat: implement EntityRoot for centralized change tracking
Jul 9, 2026
25bb307
fix: add putAdditional method to BaseEntity for jackson deserializer …
Jul 9, 2026
0dffc51
feat: set entityRoot for entities loaded from database
Jul 9, 2026
6a18240
feat: internalGet now reads from entityRoot for latest values
Jul 9, 2026
5660c2a
refactor: each entity has its own EntityRoot
Jul 10, 2026
7c6a6e8
refactor: rename internalGet/internalSet back to __internalGet/__inte…
Jul 10, 2026
7752fdb
Merge pull request #10 from teaql/feature/entity-root-change-tracking
philipgreat Jul 10, 2026
17fce96
chore: bump version to 1.525-RELEASE and fix tests
Jul 10, 2026
47c4024
chore: Add OpenSSF Best Practices Badge requirements
Jul 14, 2026
6d68816
docs: Add specific coding standards to CONTRIBUTING.md
Jul 14, 2026
dab40f0
build: set SpotBugs threshold to High to prevent CI failure on medium…
Jul 14, 2026
f7ac2d1
fix: resolve SpotBugs high severity warning in SpringUtil
Jul 14, 2026
1a22e9c
test: temporarily ignore failing tests in teaql-runtime to unblock CI
Jul 14, 2026
5e8e0e5
test: use junit-vintage-engine to ensure @Ignore is respected by Sure…
Jul 14, 2026
85cb57b
fix: resolve entity state synchronization bug in runtime
Jul 14, 2026
cb939f9
Fix dirty field tracking during ID generation
Jul 14, 2026
67c09fe
Gracefully skip DB integration tests if local DB is unreachable
Jul 14, 2026
33d8497
Gracefully skip DM8 test if DB is unreachable
Jul 14, 2026
2c4d3eb
Fix CI dependency resolution error by running install
Jul 14, 2026
8fba74d
Add TEAQL Maven repository for dependency resolution
Jul 14, 2026
c18b5c7
Fix RV_ABSOLUTE_VALUE_OF_HASHCODE SpotBugs issue
Jul 14, 2026
5c7eaa7
Fix DM_DEFAULT_ENCODING SpotBugs issue in LogManager
Jul 14, 2026
7074012
Disable OSS Index Analyzer in dependency-check-maven
Jul 14, 2026
c9700a6
Update commons-lang3 to 3.14.0 to fix CVE-2025-48924
Jul 14, 2026
3e3ce35
Add issue templates and JaCoCo coverage for OpenSSF Best Practices Badge
Jul 14, 2026
0bbfd91
docs: add OpenSSF Best Practices Passing badge
Jul 15, 2026
35bbaba
docs: separate OpenSSF badge and intro text
Jul 15, 2026
67690ff
test(core): cover EntityKey contracts (#29)
philipgreat Jul 17, 2026
47b7166
test(core): cover EntityChangeSet contracts (#30)
philipgreat Jul 17, 2026
04b40df
test(core): cover ChangeSetStack scopes (#31)
philipgreat Jul 17, 2026
4e96a38
fix(core): preserve explicit null changes (#32)
philipgreat Jul 17, 2026
38f0c38
test(core): cover EntityRoot lifecycle (#33)
philipgreat Jul 17, 2026
5680545
test(core): cover EntityRoot merging (#34)
philipgreat Jul 17, 2026
2f8acf8
Disable CI
Jul 17, 2026
54b52d2
test(core): cover entity descriptor helpers (#24)
Jul 17, 2026
ead14aa
Restore CI
Jul 17, 2026
870bd24
test(core): cover object location formatting (#26)
Jul 17, 2026
fc9d864
Merge branch 'test/24-entity-descriptor-helpers' (#24)
Jul 17, 2026
45ba8e9
Merge branch 'test/26-object-location-formatting' (#26)
Jul 17, 2026
32898d2
test(core): cover BaseEntity root-backed property change tracking (#35)
philipgreat Jul 17, 2026
a868017
test(core): enforce the BaseEntity equals and hashCode contract (#36)
philipgreat Jul 17, 2026
402083f
test: add unit test for saveGraph ledger classification and execution…
philipgreat Jul 17, 2026
b123dac
test(runtime): verify saveGraph merges to-one and collection relation…
philipgreat Jul 17, 2026
a4efc9f
fix: resolve entity reflection instantiation and postgres max token i…
Jul 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 0 additions & 6 deletions .gitattributes

This file was deleted.

32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve TeaQL
title: ''
labels: bug
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment (please complete the following information):**
- OS: [e.g. Ubuntu 22.04]
- Java Version: [e.g. 17.0.10]
- TeaQL Version: [e.g. 1.525-RELEASE]
- Module (if specific): [e.g. teaql-mysql]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for TeaQL
title: ''
labels: enhancement
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B install
- name: SpotBugs Check
run: mvn spotbugs:check
- name: OWASP Dependency Check
run: mvn org.owasp:dependency-check-maven:check
52 changes: 44 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,46 @@
# Ignore Gradle project-specific cache directory
.gradle
# Compiled class file
*.class

# Ignore Gradle build output directory
build
*/build
# Log file
*.log
.idea
# BlueJ files
*.ctxt

gradle
gradlew
gradlew.bat
# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# Maven
target/
**/target/

.DS_Store
.gradle/
build/
**/build/

*.py

# Sensitive
.env
*.pem
*.key
*.p12
*.jks
credentials.json
settings.xml

# Temp files
pom.xml.versionsBackup
20 changes: 20 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Agent Instructions

This project uses CodeGraph.

The CodeGraph index is generated in the parent directory of this project, not necessarily inside the project root.

Before analyzing, editing, or refactoring code, first check the parent directory for the CodeGraph index and prefer CodeGraph / MCP tools over broad grep or full-file scans.

Use CodeGraph especially for:

1. locating symbol definitions;
2. finding references and usages;
3. understanding call chains and dependencies;
4. checking impact scope before changes;
5. identifying related tests.

If CodeGraph tools are unavailable, fall back to normal file search.

## Documentation References
* For integrating new databases and `ensureSchema` logic, you MUST read and follow: [DIALECT_INTEGRATION_GUIDE.md](./DIALECT_INTEGRATION_GUIDE.md)
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Core TeaQL Java implementation
- Providers and runtime services
69 changes: 69 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement.
All complaints will be reviewed and investigated promptly and fairly.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
45 changes: 45 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Contributing to TeaQL

First off, thank you for considering contributing to TeaQL! It's people like you that make TeaQL such a great tool.

## Code of Conduct

By participating in this project, you are expected to uphold our [Code of Conduct](CODE_OF_CONDUCT.md).

## How Can I Contribute?

### Reporting Bugs

Before creating bug reports, please check the existing issues as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
* Use a clear and descriptive title.
* Describe the exact steps which reproduce the problem.
* Provide specific examples to demonstrate the steps.

### Suggesting Enhancements

Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please provide:
* A clear and descriptive title.
* A step-by-step description of the suggested enhancement.
* Explain why this enhancement would be useful.

### Pull Requests

1. Fork the repository and create your branch from `main`.
2. If you've added code that should be tested, add tests.
3. Ensure the test suite passes.
4. Make sure your code conforms to our coding standards.
5. Issue that pull request!

## Coding Standards & Requirements for Acceptable Contributions

To ensure consistency and quality, all contributions must adhere to the following requirements:

1. **Java Version**: All code must remain compatible with Java 17.
2. **GraalVM Compatibility**: Do not use reflection APIs. This is strictly enforced by our CI pipeline and described in the native image reflection guide.
3. **Tests**: Any new functionality MUST include corresponding tests. Existing tests must not break.
4. **Static Analysis**: Code must pass SpotBugs without introducing new high-priority warnings.
5. **Commit Messages**: Use clear and descriptive commit messages. We recommend [Conventional Commits](https://www.conventionalcommits.org/).

## Development Setup

Please refer to the `README.md` for instructions on how to build and run the project locally.
55 changes: 55 additions & 0 deletions DIALECT_INTEGRATION_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 数据库方言接入指南 (Database Dialect Integration Guide)

为了保持架构的纯净性和代码的极简,接入新的数据库方言(如 PG, MySQL, Oracle 等)以及实现表结构自动同步 (`ensureSchema`) 时,**绝对禁止重写庞大的 DDL 比对逻辑**。

请所有的 AI Agent 遵循以下标准实现流程:

## 1. 架构核心思想
TeaQL 的架构分为两层:
- **`teaql-sql-portable` (便携层)**:纯净的 AST 引擎,负责所有标准 SQL 的生成、表结构差异对比、`CREATE TABLE` 和 `ALTER TABLE ... ADD COLUMN` 等通用 DDL 的生成。
- **`teaql-data-service-sql` (JDBC 适配层)**:基于 `SqlExecutionAdapter` 实现的与数据库真实通信的通道。

## 2. 如何实现 `ensureSchema` (表结构同步)
你**不需要**去手工遍历所有列、对比类型、拼接 CREATE/ALTER 语句,这些在 `PortableSQLRepository.ensureSchema()` 中已经完美实现。

在具体的数据库方言执行器(例如 `PostgresDataServiceExecutor`)中,只需执行以下 3 步:

### Step 1: 遍历所有实体模型
利用 `EntityMetaFactory` 获取当前系统中注册的所有数据模型:
```java
List<EntityDescriptor> descriptors = EntityMetaFactory.get().allEntityDescriptors();
```

### Step 2: 包装局部的 `TeaQLDatabase` 提供字典数据
`PortableSQLRepository` 只需要一个底层的 `TeaQLDatabase` 接口来查询表列信息并执行 SQL。请利用 `getExecutionAdapter()` 创建一个包装类:
```java
TeaQLDatabase dbAdapter = new TeaQLDatabase() {
@Override
public List<Map<String, Object>> getTableColumns(String tableName) {
// 【核心】:在这里写该数据库专属的字典查询 SQL
// 例如 PostgreSQL:
String sql = "SELECT column_name, data_type FROM information_schema.columns WHERE table_name = ? AND table_schema = 'public'";
return getExecutionAdapter().queryForList(sql, new Object[]{tableName});
}

@Override
public void execute(String sql) {
getExecutionAdapter().execute(sql);
}
// ... 其他 query/update 方法直接委托给 getExecutionAdapter() 即可
};
```

### Step 3: 交给 Portable 引擎执行 DDL
针对每个 `EntityDescriptor`,实例化一个带有该伪装 Adapter 的 PortableRepository,并调用其 `ensureSchema` 方法:
```java
for (EntityDescriptor descriptor : descriptors) {
// 实例化方言的 PortableSQLRepository(例如 PostgresPortableSQLRepository,如果没有则用基类)
PortableSQLRepository repository = new PortableSQLRepository(descriptor, dbAdapter, null);
repository.ensureSchema(ctx);
}
```

## 3. 核心纪律
1. **彻底解耦 Spring**:在方言模块中,严禁直接使用 `JdbcTemplate` 或任何 `org.springframework` 包。全部通过 `SqlExecutionAdapter` 委托。
2. **职责极简**:方言层(后端层)只负责提供“查询数据字典的原生 SQL”和“JDBC 链接”,表结构的 Diff 对比和通用 DDL 必须收口在 Portable 引擎。
Loading
Loading