Skip to content

OpenElectronicsLab/sql-in-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sql-in-container
----------------

	run sql commands and/or load sql files inside of a container
	using either sql-in-postgres-container or sql-in-mariadb-container

options common to both scripts:
	-p, --port=PORT			[DEFAULT=(some free port)]
	-s, --sql=FILE_OR_COMMAND	Alternative to positional arguments
	-r, --remain-running		To access the container afterwards
	-v, --verbose
	-V, --version			print the version and exit
	-h, --help			print this message and exit


sql-in-postgres-container
-------------------------

	./sql-in-postgres-container ./example.sql "SELECT COUNT(*) FROM foo"

specific options:
	-b, --base-data-dir=PATH	[DEFAULT=./var/lib/postgresql/data]
	-c, --container-version=VERSION	[DEFAULT=17]


sql-in-mariadb-container
------------------------

	./sql-in-mariadb-container ./example.sql "SELECT COUNT(*) FROM foo"

specific options:
	-b, --var-mdb-dir=PATH		[DEFAULT=./var/mariadb]
	-c, --container-version=VERSION	[DEFAULT=10.11]
	-d, --db-schema-name=NAME	[DEFAULT=test]

License
-------
GNU General Public License (GPL), version 3 or later.
See COPYING or https://www.gnu.org/licenses/gpl-3.0.txt for details.

Copyright (C) 2021-2025 Stichting Open Electronics Lab

About

run sql commands and/or load sql files inside of a container

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages