package
module
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: Mar 24, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
post05
Working with PostgreSQL DB in Go
Create tables by running the next command:
$ psql -h localhost -p 5432 -U jamiu {database name} < create_tables.sql
Documentation
¶
View Source
var (
Hostname = ""
Port = 2345
Username = ""
Password = ""
Database = ""
)
Connection details
AddUser adds a new user to the database
Returns new User ID
-1 if there was an error
DeleteUser deletes an existing user
UpdateUser is for updating an existing user
Userdata is for holding full user data
Userdata table + Username
ListUsers lists all users in the database
Source Files
¶
Click to show internal directories.
Click to hide internal directories.