Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
0e5fe23
ref: cleanup for major rewrite
gKits Dec 20, 2023
d655b7a
ref: more cleanup
gKits Dec 20, 2023
f101b2d
ci: add makefile
gKits Dec 22, 2023
c50edf3
feat: add b+tree implementation in internal tree package
gKits Dec 22, 2023
d2dfd7d
feat: add parse package containing lexer and parser
gKits Dec 22, 2023
36eb426
chore: add docs.go in project root
gKits Dec 22, 2023
0f0b792
docs: change docs framework from hugo to docsify for simplicity
gKits Jan 3, 2024
2e33753
feat: implement iterator type and stack package for b+tree iteration
gKits Jan 4, 2024
4a488e9
ci: update Makefile
gKits Jan 4, 2024
77381df
docs: remove build tag for hugo docs
gKits Jan 4, 2024
f1d07f0
refactor: delete old implementation and start new btree
gKits Jul 19, 2024
0bdce28
chore: cleanup
gKits Jan 24, 2025
2e776ec
chore: add test dependencies
gKits Feb 4, 2025
519f573
feat(node): add bpt/node package
gKits Feb 4, 2025
dc3e9d0
docs: update README
gKits Feb 4, 2025
2b1b3a6
feat(parse): implement simple tokenizer
gKits Feb 4, 2025
1be262f
feat(parse): add blueprint for basic parsing loop
gKits Feb 4, 2025
8165314
chore: remove hugo ignores
gKits Feb 4, 2025
13c6034
ci: update go version
gKits Feb 4, 2025
086737f
ci: adjust pipeline parameters
gKits Feb 4, 2025
12d3f30
feat: add blueprint files for ast and bpt
gKits Feb 4, 2025
304d1a0
feat(bpt): add commit and rollback to pager interface
gKits Feb 8, 2025
72285bf
feat(node): add sizeof function
gKits Feb 8, 2025
29311a3
feat(node): change center calc of split func
gKits Feb 8, 2025
faab4b9
test(node): add and adjust tests
gKits Feb 8, 2025
671a71c
chore: add initial linter config
gKits Feb 8, 2025
9388d5d
feat(node): add pointer function
gKits Feb 8, 2025
fa4e5f9
feat(bpt): add basic get function
gKits Feb 8, 2025
cb390b7
feat: rewrite a lot of stuff
gKits Jun 23, 2025
4349c27
remove generated public dir
Jun 23, 2025
11607a0
ci: migrate from golangcilint v1 to v2
Jun 23, 2025
d42f814
style: move custom errors into node.go
Jun 23, 2025
4411ce3
implement node type
Jun 23, 2025
d788282
docs: add logo
gKits Jul 3, 2025
06965de
feat: add cli blueprint with cobra
Jul 4, 2025
277b4ed
feat: add pavofmt scaffold
Jul 4, 2025
3914ac2
feat: cli scaffold
Jul 4, 2025
a2373a7
refactor(tree): move node package into tree package
Jul 4, 2025
ed1c72c
feat(ast/parse): add basic ast statement types
Jul 4, 2025
865bf96
feat(node): implement delete function
gKits Jul 5, 2025
46af093
feat(node): use common page type
gKits Jul 5, 2025
1750313
feat(node): use common page type
gKits Jul 5, 2025
6bd8b11
ci: add testing and building pipeline
gKits Jul 5, 2025
16cc90d
feat(node): add Pointer method to retrieve page pointer
gKits Jul 5, 2025
983da75
feat(tree): start implementing Get functionality
gKits Jul 5, 2025
1357ffd
feat(common): add page types
gKits Jul 5, 2025
7091241
ci: linter config
gKits Jul 5, 2025
920f88f
chore: dependencies, license and more
gKits Jul 5, 2025
b7c4b38
Merge branch 'rewrite' of https://github.com/pavosql/pavosql into rew…
gKits Jul 5, 2025
8d73eed
chore: go mod tidy
gKits Jul 5, 2025
795f07f
refactor(tree): merge common package into tree package
gKits Jul 5, 2025
f55dcc4
chore: move ownership of project
gKits Jul 6, 2025
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
7 changes: 0 additions & 7 deletions .dockerignore

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/gobuild.yaml → .github/workflows/build.yaml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Go build
name: Build
on: [push]

jobs:
Expand All @@ -10,8 +10,8 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.x'
- name: Install dependencies
run: go get .
go-version-file: go.mod
cache-dependency-path: |
go.sum
- name: Build
run: go build -v ./cmd/pavosql
72 changes: 0 additions & 72 deletions .github/workflows/hugo.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/gotest.yaml → .github/workflows/test.yaml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Go test
name: Test
on: [push]

jobs:
Expand All @@ -10,8 +10,8 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.x'
- name: Install dependencies
run: go get .
go-version-file: go.mod
cache-dependency-path: |
go.sum
- name: Test with the Go CLI
run: go test -v ./...
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,4 @@ bin
# Go workspace file
go.work

# Hugo Docs
docs/.hugo_build.lock
public
docs/public

dist/
Empty file added .gitmodules
Empty file.
40 changes: 40 additions & 0 deletions .golangci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version = '2'

[linters]
default = 'none'
enable = [
'errcheck',
'gosec',
'govet',
'ineffassign',
'lll',
'staticcheck',
'unused'
]

[linters.exclusions]
generated = 'lax'
presets = [
'comments',
'common-false-positives',
'legacy',
'std-error-handling'
]
paths = [
'third_party$',
'builtin$',
'examples$'
]

[formatters]
enable = [
'gofmt'
]

[formatters.exclusions]
generated = 'lax'
paths = [
'third_party$',
'builtin$',
'examples$'
]
12 changes: 0 additions & 12 deletions Dockerfile

This file was deleted.

Empty file modified LICENSE
100644 → 100755
Empty file.
8 changes: 0 additions & 8 deletions Makefile

This file was deleted.

53 changes: 27 additions & 26 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
# PavoSQL
<div align="center">
<a href="https://github.com/gkits/pavosql">
<img src="assets/pavosql-gopher.png" alt="pavosql gopher" width="240" height="240">
</a>
<h1 align="center">PavoSQL</h1>
<p align="center">
</p>
</div>

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Build](https://github.com/gKits/PavoSQL/actions/workflows/gobuild.yaml/badge.svg)](https://github.com/gKits/PavoSQL/actions/workflows/gobuild.yaml)
[![Test](https://github.com/gKits/PavoSQL/actions/workflows/gotest.yaml/badge.svg)](https://github.com/gKits/PavoSQL/actions/workflows/gotest.yaml)
[![Build Hugo docs and deploy to pages](https://github.com/gKits/PavoSQL/actions/workflows/hugo.yaml/badge.svg)](https://gkits.github.io/PavoSQL)
[![Build](https://github.com/gkits/pavosql/actions/workflows/build.yaml/badge.svg)](https://github.com/gkits/pavosql/actions/workflows/build.yaml)
[![Test](https://github.com/gkits/pavosql/actions/workflows/test.yaml/badge.svg)](https://github.com/gkits/pavosql/actions/workflows/test.yaml)

**This is a learning project and is not meant to be run in production environments.**

**This project is stil w.i.p.**

PavoSQL is a SQL relational Database written in pure Go, meaning only using Go's standard library.
**This is project is still work in progress and not supposed to be used in any productive setting.**

## Roadmap

- [x] Atomic backend store on single file
- [ ] Relational model build on KV Store
- [ ] Point queries
- [ ] Range queries
- [ ] Insert
- [ ] Delete
- [ ] Sorting
- [ ] Group By
- [ ] Joins
- [ ] Lexer and Parser for SQL queries
- [ ] Database server and client to use PavoSQL over the network
- [ ] User and privilege system
- [ ] Database engine
- [ ] Single file backend
- [ ] B+tree structure
- [ ] Concurrent r/w
- [ ] Atomic i/o
- [ ] SQL
- [ ] Relational model
- [ ] Tables
- [ ] Indexes
- [ ] Metadata
- [ ] Lexer, parser and AST
- [ ] Query functionality
- [ ] Network
- [ ] Server + client
- [ ] Authentication + Authorization
- [ ] Implement [database/sql](https://pkg.go.dev/database/sql) driver interface
- [ ] Database Management System in single directory
- [ ] Windows compatibilty of backend store (remain atomic)
- [ ] Documentation
- [ ] Installable as service/daemon (e.g. systemd)
- [ ] Create and release Docker image
- [ ] 80% Test coverage (not needed but nice to have)
- [ ] Docker image

## Reference material

Expand Down
Binary file added assets/pavosql-gopher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
95 changes: 95 additions & 0 deletions assets/pavosql-gopher.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions cmd/pavofmt/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package main
37 changes: 37 additions & 0 deletions cmd/pavosql/cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package cmd

import (
"os"

"github.com/gkits/pavosql/cmd/pavosql/cmd/serve"
"github.com/gkits/pavosql/cmd/pavosql/cmd/version"
"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{
Use: "pavosql",
Short: "A brief description of your application",
Long: `A longer description that spans multiple lines and likely contains
examples and usage of using your application. For example:

Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
// Uncomment the following line if your bare application
// has an action associated with it:
// Run: func(cmd *cobra.Command, args []string) { },
}

func Execute() {
err := rootCmd.Execute()
if err != nil {
os.Exit(1)
}
}

func init() {
rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")

rootCmd.AddCommand(version.Command())
rootCmd.AddCommand(serve.Command())
}
24 changes: 24 additions & 0 deletions cmd/pavosql/cmd/serve/serve.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package serve

import (
"github.com/spf13/cobra"
)

var (
port uint16
)

func Command() *cobra.Command {
var serveCmd = &cobra.Command{
Use: "serve",
Short: "",
Long: "",
Run: func(cmd *cobra.Command, args []string) {
// TODO: start server
},
}

serveCmd.Flags().Uint16VarP(&port, "port", "p", 6677, "")

return serveCmd
}
18 changes: 18 additions & 0 deletions cmd/pavosql/cmd/version/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package version

import (
"fmt"

"github.com/spf13/cobra"
)

func Command() *cobra.Command {
return &cobra.Command{
Use: "version",
Short: "",
Long: "",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("v0.0.0")
},
}
}
29 changes: 28 additions & 1 deletion cmd/pavosql/main.go
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
/*
MIT License

# Copyright (c) 2023 Georgios Kitsikoudis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
package main

func main() {}
import "github.com/gkits/pavosql/cmd/pavosql/cmd"

func main() {
cmd.Execute()
}
24 changes: 24 additions & 0 deletions docs.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
MIT License

# Copyright (c) 2023 Georgios Kitsikoudis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
package pavosql
Loading
Loading