flesh out some more stuff in the manpage.
do a REV bump for once, since we don't actually change any real details
This commit is contained in:
parent
5891c55432
commit
b95f372d1d
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.126 2020/07/06 09:06:45 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.127 2020/07/07 10:53:27 espie Exp $
|
||||
|
||||
CATEGORIES = databases
|
||||
V = 7.32
|
||||
@ -13,6 +13,7 @@ PKGNAME-list = portslist-$V
|
||||
|
||||
PERMIT_PACKAGE = Yes
|
||||
MULTI_PACKAGES = -main -list
|
||||
REVISION = 0
|
||||
|
||||
DBNAME = sqlports
|
||||
SQLCACHE = ${DBNAME}_cache.sql
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: sqlports.5,v 1.3 2020/07/06 09:06:45 espie Exp $
|
||||
.\" $OpenBSD: sqlports.5,v 1.4 2020/07/07 10:53:27 espie Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2020 Marc Espie <espie@openbsd.org>
|
||||
.\"
|
||||
@ -14,7 +14,7 @@
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.Dd $Mdocdate: July 6 2020 $
|
||||
.Dd $Mdocdate: July 7 2020 $
|
||||
.Dt SQLPORTS 5
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -223,6 +223,45 @@ The database also contains a caching table named
|
||||
that contains the actual data from the
|
||||
.Sq Ports
|
||||
view.
|
||||
.Sh EXAMPLES
|
||||
Looking at the details of a view:
|
||||
.Bd -literal -offset indent
|
||||
sqlite> .schema depends
|
||||
CREATE VIEW Depends AS
|
||||
SELECT
|
||||
_Paths.Id AS PathId,
|
||||
_Paths.FullPkgPath AS FullPkgPath,
|
||||
FullDepends,
|
||||
PkgSpec,
|
||||
Rest,
|
||||
T0001.FullPkgpath AS DependsPath,
|
||||
Type,
|
||||
N
|
||||
FROM _Depends
|
||||
JOIN _Paths
|
||||
ON _Paths.Canonical=_Depends.FullPkgPath
|
||||
JOIN _Paths T0001
|
||||
ON T0001.Canonical=DependsPath
|
||||
/* Depends(PathId,FullPkgPath,FullDepends,PkgSpec,Rest,DependsPath,Type,N) */;
|
||||
.Ed
|
||||
List the fullpkgpaths of leaf ports (not a dependency of anything):
|
||||
.Bd -literal -offset indent
|
||||
sqlite> select distinct fullpkgpath from _paths where pkgpath not in
|
||||
(select pkgpath from _paths
|
||||
join _depends on _depends.dependspath=_paths.id);
|
||||
.Ed
|
||||
.Sh BUGS AND LIMITATIONS
|
||||
The optimizer in
|
||||
.Xr sqlite 1
|
||||
doesn't care for non-standard constructs such as
|
||||
.Sq group_concat
|
||||
and doesn't optimize left joins away when it should,
|
||||
so even if you don't ask for agregated columns in the
|
||||
.Sq Ports
|
||||
view, it will compute them irregardless.
|
||||
Hence the
|
||||
.Sq PortsQ
|
||||
cache.
|
||||
.Sh FILES
|
||||
.Pa ${TRUEPREFIX}/share/sqlports
|
||||
.Sh SEE ALSO
|
||||
|
Loading…
x
Reference in New Issue
Block a user