grass-sqlite(1grass)
π SQLite DATABASE DRIVER π
okay bestie, lemme put you on π
this is grass-sqlite, and it's literally the default DBMI backend. the main character, no cap. π
β¨ Creating a SQLite database β¨
so here's the tea π: GRASS will automatically create the SQLite database for you if it doesn't exist yet β this happens the moment the first table gets created in the SQLite database. like, you don't gotta do a thing. it's giving self-sufficient. π¦
all you actually need to do is define the connection (that's literally the next step, keep scrolling babe π).
πΈ Connecting GRASS to SQLite πΈ
the database name β 'sqlite.db' β is your choice, queen. pick whatever. and the file storage location? also totally up to you, go off. π
and if the database doesn't exist yet? don't stress, it gets automatically created when database content is created:
# example for storing DB in mapset directory (keep single quotes):
db.connect driver=sqlite database='$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db'
db.connect -p
β οΈ okay important: keep those single quotes in thatdb.connectline, fr fr. note also that the second command uses-pβ yes that's the flag, exactly like that.
π₯ Supported SQL commands π₯
all the SQL commands that SQLite supports. all of them. periodt. π
(for the limitations tho, go check the SQLite help page: SQL As Understood By SQLite and Unsupported SQL β iykyk)
β Operators available in conditions β
all the SQL operators that SQLite supports. every single one. slay. β¨
π¦ Browsing table data in DB π¦
a convenient SQLite front-end is sqlitebrowser. icon behavior honestly. π
to open a DB file that lives inside the current mapset, here's the suggested way (and yes this corresponds to that database connection from up above β¬οΈ):
# fetch GRASS variables as shell environment variables:
eval `g.gisenv`
# use double quotes:
sqlitebrowser "$GISDBASE/$LOCATION_NAME/$MAPSET"/sqlite/sqlite.db
π bestie use double quotes in thatsqlitebrowserline, and note that theeval \g.gisenv`` uses backticks β copy it exactly, don't freestyle it.
π SEE ALSO π
db.connectdb.executedb.select- SQL support in GRASS
- SQLite web site
- SQLite manual
sqlite- Management Tools
π SOURCE CODE π
available at: SQLite DATABASE DRIVER source code (history)
accessed: Tuesday Sep 08 11:54:02 2026
main index | topics index | keywords index | graphical index | full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
and that's the whole vibe bestie π this manual page came to you from GRASS 8.5.0, grass-sqlite(1grass) β go create some tables, you got this πβ¨π
π¦ where this page comes from
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms