paraswaykole / slashbase Goto Github PK
View Code? Open in Web Editor NEWModern database IDE for your dev & data workflows. Supports MySQL, PostgreSQL & MongoDB.
Home Page: https://slashbase.com
License: Apache License 2.0
Modern database IDE for your dev & data workflows. Supports MySQL, PostgreSQL & MongoDB.
Home Page: https://slashbase.com
License: Apache License 2.0
Cause that what I use
Sometimes, starting slashbase doesn't show projects and databases
Steps to reproduce:
brew tap slashbaseide/brew
brew install slashbase
slashbase
exit
slashbase
... doing it multiple times...sometimes the glitch occurs.
Often: refreshing browser does work.
Using MySQL,
Whenever I insert new data into the table, I have to close the tab (open the table tab) and then see the data change.
Another solution would be to add a refresh button over a tab, after clicking it data in the table gets updated automatically no need to close the tab and open it again.
Updating a string array from UI, set the value to null instead of setting the updated array.
Unable to connect to MongoDB if there are special characters in the password.
For example: I was connecting to the database I have in Azure VM with a password which has '@' in it. The connection was failing as the special character has to be converted into Hexadecimal ASCII i.e. '@' will convert to '%40'. After this change, I was able to connect to the database.
I have made changes in this commit. @paraswaykole you can take a look and if all these changes seems okay, then I can raise a PR for this or if there is some other better way of doing this.
Help improve the existing code quality of the project by fixing issues listed on codefactor page of the repository.
Link: https://www.codefactor.io/repository/github/slashbaseide/slashbase
Downloading the binary file without Docker & running gives an error
❯ slashbase
Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub
mostly because the release binaries has an indirect dependency on go-sqlite3
which in turn needs to be built with CGO
~/.local/bin
Add 'CGO_ENABLED=1' to go build release command
Please add MySQL support.
Should not be hard to implement, and it's more used worldwide than PostgreSQL
On up arrow key in console, scroll through the commands history, the default behaviour in any terminal app.
var build = config.BUILD_SERVER
to BUILD_SERVER
version: '3.8'
services:
slashbase-db:
image: postgres
container_name: slashbase-db
restart: always
ports:
- '5432:5432'
volumes:
- ./data/postgres/data:/var/lib/postgresql/data
environment:
POSTGRES_DB: petclinic
POSTGRES_USER: petclinic
POSTGRES_PASSWORD: petclinic
healthcheck:
test: pg_isready -U petclinic -d petclinic
interval: 5s
timeout: 5s
retries: 3
development.server.env
passed the valuesAPP_DB_HOST=localhost
APP_DB_PORT=5432
APP_DB_USER=petclinic
APP_DB_PASS=petclinic
APP_DB_NAME=petclinic
Run the slashbase app on your local machine, connect to a Postgres db and try running all different kind of queries supported by PostgreSQL and file a bug in the issues if any query doesn't work.
I was trying slashbase out after installing postgresql
and creating a posts
database with the following schema:
CREATE TABLE posts (id BIGSERIAL PRIMARY KEY, title TEXT, content TEXT);
When I added a tuple in the table via the slashbase UI, I expected the id
field to be updated automatically.
However the UI showed the value for the id
column as NULL
.
Even though it showed the id
field with the correct value within the slashbase CLI.
Note that I had to reload the page (in my case I clicked the the project name on the sidebar to reload the data) to get the correct result to show on the slashbase UI:
Maybe we could give an option to the Users to specify which columns need to be returned after doing the INSERT
s? Not sure if this might cover columns with default values specified too.
Use slashbase to create a new PostgreSQL link, Display Name:
enter the link name, then delete the PostgreSQL link, and then use the same Display Name:
name to create a PostgreSQL link. At this time, the link test can pass, but click ADD
, Prompt there was some problem
If the Display Name
item is the same as before (the corresponding PostgreSQL item has been deleted), it cannot be added.
When slashbase deletes a project or database, the corresponding project or database information still remains in the database.
slashbase:docker ,v0.10.1
PostgreSQL:docker,15.1
Run the Slashbase app on your local machine, connect to a MongoDB and try running all different kind of queries supported by MongoDB and file a bug in the issues if any query doesn't work.
Run the Slashbase app on your local machine, connect to a MySQL and try running all different kind of queries supported by MySQL and file a bug in the issues if any query doesn't work.
Add a refresh button somewhere at the top to refresh the query history.
In the view, where user adds a new database connection, it will be good to have the ability to toggle the database password field.
Something like this will be nice.
Tried connecting the cloud database provided by MongoDB in Azure Pune Region.
Database Offering: MongoDB Atlas Free Tier
Provider: MongoDB via Azure
Scheme: mongodb-srv
When tried to connect with mongodb-srv as scheme. I got the following panic message:
This error is not produced when the selected scheme is just mongodb
2023/01/13 15:48:31 [Recovery] 2023/01/13 - 15:48:31 panic recovered:
POST /api/v1/dbconnection/create HTTP/1.1
Host: localhost:22022
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en
Connection: keep-alive
Content-Length: 296
Content-Type: text/json
Origin: http://localhost:3000
Referer: http://localhost:3000/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-site
Sec-Gpc: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
interface conversion: interface {} is int32, not float64
c:/go/src/runtime/iface.go:262 (0x7ff71867bee9)
panicdottypeE: panic(&TypeAssertionError{iface, have, want, ""})
X:/Github/slashbase/pkg/queryengines/mongoqueryengine/queryengine.go:367 (0x7ff718cce7e4)
(*MongoQueryEngine).TestConnection: test := data["data"].([]map[string]interface{})[0]["ok"].(float64)
X:/Github/slashbase/pkg/queryengines/queryengines.go:32 (0x7ff71915417c)
TestConnection: return mongoQueryEngine.TestConnection(dbConn, config)
X:/Github/slashbase/internal/controllers/dbconnection.go:36 (0x7ff7194a7926)
DBConnectionController.CreateDBConnection: success := queryengines.TestConnection(dbConn.ToQEConnection(), qemodels.NewQueryConfig(false, nil))
X:/Github/slashbase/internal/handlers/dbconnection.go:34 (0x7ff7194abae9)
DBConnectionHandlers.CreateDBConnection: dbConn, err := dbConnController.CreateDBConnection(createBody.ProjectID, createBody.Name, createBody.Type, createBody.Scheme, createBody.Host, createBody.Port,
C:/Users/prash/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x7ff71949c681)
(*Context).Next: c.handlers[c.index](c)
C:/Users/prash/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99 (0x7ff71949c66c)
CustomRecoveryWithWriter.func1: c.Next()
C:/Users/prash/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x7ff71949b4fd)
(*Context).Next: c.handlers[c.index](c)
C:/Users/prash/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:489 (0x7ff71949b185)
(*Engine).handleHTTPRequest: c.Next()
C:/Users/prash/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:445 (0x7ff71949ace4)
(*Engine).ServeHTTP: engine.handleHTTPRequest(c)
c:/go/src/net/http/server.go:2916 (0x7ff718b7bdfa)
serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
c:/go/src/net/http/server.go:1966 (0x7ff718b76df6)
(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
c:/go/src/runtime/asm_amd64.s:1571 (0x7ff7186d5a60)
goexit: BYTE $0x90 // NOP
Show tables command does not work in MySQL console
Hello,
When i run docker run -p 3000:3000 slashbaseide/slashbase
I have an error and the container stops
Running Slashbase IDE at http://localhost:3000
Type 'help' for more info on cli.
2022/12/23 02:13:50 unable to initialize embedded filesystem: no ID found in the file
2022/12/23 02:13:50 using local filesystem for static assets
slashbase >
Please update your contributing guidelines.
There are some issues with the current guidelines.
In the section on setting up the development environment, it is stated that the file at development.env.sample should be copied and pasted as development.env in the root directory of the project. However, in this section on configuring the .env.local file, additional information is provided about updating email and password in the frontend package.
Additionally, in the section on running the project, it is stated that the project will listen on ports 3000 and 3001, but in reality, it only listens on port 22022. Thank you.
I noticed that there is only one file for test:- here. Can i add more test cases and datamocks ?
Hello.
I'm getting an error when creating a new DB connection.
My suspicion is that the error occurs if there is an exclamation point at the end of the password.
Thank you for creating such a great project.
I created a CosmosDB instance in Azure which uses MongoDB API v4.2. After the resource is created I used the connection details to connect to the instance using Slashbase UI. The connection failing with the error message in the UI - "failed to connect to database".
I think the problem is due to the SSL/TLS connection. Will investigate this in more detail and report it here.
I tried executing the below query from the IDE and it is panicking. The query works fine in Mongo console and when testing with other IDEs.
db.credits.aggregate([{$lookup:{from: "movies", localField: "id", foreignField: "id", as: "results"}}])
Here is the panic output in console.
2023/01/16 18:32:02 [Recovery] 2023/01/16 - 18:32:02 panic recovered:
POST /api/v1/query/run HTTP/1.1
Host: localhost:22022
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en
Connection: keep-alive
Content-Length: 181
Content-Type: text/json
Origin: http://localhost:3000
Referer: http://localhost:3000/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-site
Sec-Gpc: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
runtime error: index out of range [0] with length 0
c:/go/src/runtime/panic.go:89 (0x7ff6e60a5d7e)
goPanicIndex: panic(boundsError{x: int64(x), signed: true, y: y, code: boundsIndex})
X:/Github/slashbase/pkg/queryengines/mongoqueryengine/queryengine.go:280 (0x7ff6e66ce0ae)
(*MongoQueryEngine).RunQuery: Aggregate(context.Background(), queryType.Args[0])
X:/Github/slashbase/pkg/queryengines/queryengines.go:23 (0x7ff6e6b5410e)
RunQuery: return mongoQueryEngine.RunQuery(dbConn, query, config)
X:/Github/slashbase/internal/controllers/query.go:23 (0x7ff6e6ea8607)
QueryController.RunQuery: data, err := queryengines.RunQuery(dbConn.ToQEConnection(), query, getQueryConfigsForProjectMember(dbConn))
X:/Github/slashbase/internal/handlers/query.go:25 (0x7ff6e6eadd44)
QueryHandlers.RunQuery: data, err := queryController.RunQuery(runBody.DBConnectionID, runBody.Query)
C:/Users/prash/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x7ff6e6e9c701)
(*Context).Next: c.handlers[c.index](c)
C:/Users/prash/go/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:99 (0x7ff6e6e9c6ec)
CustomRecoveryWithWriter.func1: c.Next()
C:/Users/prash/go/pkg/mod/github.com/gin-gonic/[email protected]/context.go:165 (0x7ff6e6e9b57d)
(*Context).Next: c.handlers[c.index](c)
C:/Users/prash/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:489 (0x7ff6e6e9b205)
(*Engine).handleHTTPRequest: c.Next()
C:/Users/prash/go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:445 (0x7ff6e6e9ad64)
(*Engine).ServeHTTP: engine.handleHTTPRequest(c)
c:/go/src/net/http/server.go:2916 (0x7ff6e657bdfa)
serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
c:/go/src/net/http/server.go:1966 (0x7ff6e6576df6)
(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
c:/go/src/runtime/asm_amd64.s:1571 (0x7ff6e60d5a60)
goexit: BYTE $0x90 // NOP
I found the problem to be in this function mongoutils.IsQueryTypeRead(queryType)
where the query.Args
is having 0 elements and therefore panicking. I suppress the panic here but when it gets back in the queryengine
query conditional checks for queryType then it panics there.
After a command is entered in the console and the commands results in a large table as output, the console displays the output but doesn't scroll properly to the bottom of the console.
Would be great to have an option to use a connection string to add a database connection (at least for PostgreSQL).
Able to create a new project without providing a project name.
Create New Project -> Enter Project Name -- Do not type anything and click on Create. This will create a new project with the empty name.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.