Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ Use the editor for your own SQL, inspect a query plan, revisit query history or

**Use Tab to accept a suggestion that follows your current schema.** Choose word completion, the next word, the next three words or the rest of a line. Suggestions use local SQL vocabulary, table names and columns. This editor assistance works without an AI account or model call; asking the tutor to generate SQL is a separate feature.

Longer completion modes extend a suggestion only when the continuation is unambiguous. Choosing the next three words does not force three guessed words: the editor may offer a shorter completion when several tables, columns or SQL clauses would be valid. Accepting a suggestion preserves the SQL after the cursor. See the [editor architecture](docs/en/architecture.md) for how local workers handle completion and highlighting.

## Learn a concept, then try it

![A SELECT lesson with explanations and SQL examples](docs/showcase/cards/guided-learning.en.png)
Expand Down
2 changes: 2 additions & 0 deletions README.tr.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ Kendi SQL’ini yaz, sorgu planını incele, geçmiş sorgulara dön veya sohbet

**Mevcut şemanı izleyen öneriyi Tab ile kabul et.** Kelime, sıradaki kelime, sonraki üç kelime veya satırın kalanı için tamamlama seçebilirsin. Öneriler yerel SQL sözlüğünü, tablo ve sütun adlarını kullanır. Editörün bu yardımı AI hesabı veya model çağrısı gerektirmez; öğretmenden sorgu yazmasını istemek ayrı bir özelliktir.

Uzun tamamlama modları, devamı belirsiz olmadığında öneriyi genişletir. Sonraki üç kelimeyi seçmek, her durumda üç kelime önerileceği anlamına gelmez: birden fazla tablo, sütun veya SQL ifadesi uygun olduğunda öneri daha kısa kalabilir. Öneriyi kabul etmek, imleçten sonraki SQL'i korur. Yerel iş parçacıklarının tamamlamayı ve renklendirmeyi nasıl işlediğini [editör mimarisinde](docs/tr/architecture.md) inceleyebilirsin.

## Bir kavram öğren, sonra dene

![Açıklamalar ve SQL örnekleriyle SELECT dersi](docs/showcase/cards/guided-learning.tr.png)
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/architecture.json
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@
"references": {
".github/SECURITY.md": "470353c7e0447bd45fea3e4040507f03253c3cc762bac12ed424e9f6f93d648d",
"LICENSE": "c03af9304b8b44d8f65921a325a7f2077ebb89e5c64fc309106b3c547ef02d09",
"README.md": "74e2b60b292faa39f6624a22429f01d9e234a993e9056ad889ecfb320e20281c",
"README.md": "245c647ac23f66cb8b28ded1885a4777dbf0ceeee47e83ec59b82a46582a1ec1",
"app/ai-rate-limit.js": "fdf24873dfb664444f28728abe483a3f363e3aa61d16201a2cb1429ef67a2ff8",
"app/chatgpt-account.js": "1ea42388b92788b93804a9f0b6fc3441039ce26af2b837e9e5e732c160a99f32",
"app/database-inspection/runner.cjs": "32265046ec123e4248845436a523f67ff069bb7ebd8bb83102fc43e249d11d20",
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/index.html

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/en/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ PractiSQL is a local SQLite learning workspace with an optional AI tutor. Its AI

The SQL editor uses an incremental CodeMirror document. Local workers handle SQL syntax parsing and completion analysis; only the visible code ranges receive rendered highlight spans. Editing a large script therefore does not rebuild the whole highlighted document on each keystroke. Suggestions use cached schema definitions, columns, aliases and declared foreign keys, without querying table records. Highlighting, completion, selection and copying remain available for large scripts. These presentation workers do not execute SQL or alter the execution paths described below.

Completion tracks the current statement, SELECT scope and SQL clause. A table alias identifies its own columns; result aliases stay within their SELECT rather than leaking into another statement, a nested query or a window clause. Longer modes extend a completion through an unambiguous continuation, including a JOIN condition backed by a declared foreign key. They do not invent relationships or fill an ambiguous position with an arbitrary column. Tab accepts the proposed text without replacing the SQL after the cursor.

![PractiSQL request and execution flow](../architecture/ai-harness.en.svg)

The diagram connects three layers: source-backed context and memory, model and tool orchestration, and local SQLite execution with actual operation records. The learning workflows below share this foundation with their own data and evaluation rules. Green arrows show request/execution flow, dashed lines show source retrieval and feedback, and amber lines show the single conditional repair path.
Expand Down
2 changes: 2 additions & 0 deletions docs/tr/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ PractiSQL, cihazda çalışan bir SQLite çalışma alanını isteğe bağlı bi

SQL editörü, CodeMirror ile metnin değişen bölümünü işler. Yerel iş parçacıkları SQL renklendirmesini ve tamamlama önerilerini hesaplar; arayüz yalnızca görünür kod aralıklarının renklerini çizer. Böylece büyük bir sorguda her tuş basışında metnin tamamının renkli görünümü yeniden oluşturulmaz. Öneriler, tablo kayıtlarını sorgulamadan önbellekteki şema tanımlarını, sütunları, takma adları ve tanımlı dış anahtarları kullanır. Renklendirme, tamamlama, seçim ve kopyalama büyük sorgularda da kullanılabilir. Bu görsel işlemler SQL çalıştırmaz ve aşağıda açıklanan yürütme yollarını değiştirmez.

Tamamlama motoru mevcut komutu, SELECT kapsamını ve SQL'in hangi bölümünde yazıldığını izler. Tablo takma adı kendi sütunlarını gösterir; sonuç takma adları başka bir komuta, iç sorguya veya pencere fonksiyonunun kapsamına taşınmaz. Uzun modlar, devamı belirsiz olmadığında öneriyi genişletir; tanımlı bir dış anahtara dayanan JOIN koşulu da buna dahildir. Motor ilişki uydurmaz ve belirsiz bir konumu rastgele bir sütunla doldurmaz. Tab tuşu önerilen metni kabul ederken imleçten sonraki SQL'i korur.

![PractiSQL AI harness: bağlam, model araçları, SQL kontrolleri ve öğrenme akışları](../architecture/ai-harness.tr.svg)

Şema üç ana katmanı birlikte gösterir: kaynak kimliğiyle saklanan bağlam ve bellek, model ve araç çağrılarının yönetimi, yerel SQLite yürütmesi ve gerçekleşen işlem kayıtları. Alt sıradaki öğrenme yolları bu temeli kendi veri ve değerlendirme kurallarıyla kullanır. Yeşil oklar istek/yürütme yolunu, kesikli çizgiler kaynak getirmeyi ve geri beslemeyi, kehribar çizgiler tek ve koşullu düzeltmeyi gösterir.
Expand Down
Loading