6a00dc5ed2
Submitted by: Yuko Sasaki <yuko@veltec.co.jp>
219 lines
6.8 KiB
Groff
219 lines
6.8 KiB
Groff
.\" Copyright (c) 1990, 1993
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed by the University of
|
|
.\" California, Berkeley and its contributors.
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" @(#)recno.3 8.5 (Berkeley) 8/18/94
|
|
.\" %FreeBSD: src/lib/libc/db/man/recno.3,v 1.4.2.2 2001/12/14 18:33:49 ru Exp %
|
|
.\" $FreeBSD$
|
|
.\"
|
|
.Dd August 18, 1994
|
|
.Dt RECNO 3
|
|
.Os
|
|
.Sh ̾¾Î
|
|
.Nm recno
|
|
.Nd ¥ì¥³¡¼¥ÉÈÖ¹æ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ø¤Î¥¢¥¯¥»¥¹¼êË¡
|
|
.Sh ½ñ¼°
|
|
.In sys/types.h
|
|
.In db.h
|
|
.Sh ²òÀâ
|
|
.Fn dbopen
|
|
¥ë¡¼¥Á¥ó¤Ï¡¢¥Ç¡¼¥¿¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¥é¥¤¥Ö¥é¥ê¥¤¥ó¥¿¥Õ¥§¡¼¥¹
|
|
¤Ç¤¹¤¬¡¢¤½¤³¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¥Õ¥©¡¼¥Þ¥Ã¥È¤Î 1 ¤Ä¤Ë¡¢
|
|
¥ì¥³¡¼¥ÉÈÖ¹æ¥Õ¥¡¥¤¥ë¤¬¤¢¤ê¤Þ¤¹¡£¥Ç¡¼¥¿¥Ù¡¼¥¹¥¢¥¯¥»¥¹¼êË¡¤Î°ìÈÌ»ö¹à¤Ë¤Ä¤¤¤Æ¤Ï¡¢
|
|
.Xr dbopen 3
|
|
¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£¤³¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ç¤Ï¡¢
|
|
.Nm
|
|
¤Î¸ÇÍ»ö¹à¤Ë¤Ä¤¤¤Æ
|
|
ÀâÌÀ¤·¤Þ¤¹¡£
|
|
.Pp
|
|
¥ì¥³¡¼¥ÉÈÖ¹æ¥Ç¡¼¥¿¹½Â¤¤Ï¡¢¥Õ¥é¥Ã¥È¥Õ¥¡¥¤¥ë¥Õ¥©¡¼¥Þ¥Ã¥È¤ÇÊݸ¤µ¤ì¤¿¡¢
|
|
²ÄÊÑŤ¢¤ë¤¤¤Ï¸ÇÄêĹ¤Î¥ì¥³¡¼¥É¤Ç¡¢ÏÀÍý¥ì¥³¡¼¥ÉÈÖ¹æ¤Ç¥¢¥¯¥»¥¹¤µ¤ì¤Þ¤¹¡£
|
|
¥ì¥³¡¼¥ÉÈÖ¹æ 5 ¤¬Â¸ºß¤¹¤ë¤È¤¤¤¦¤³¤È¤Ï¡¢¥ì¥³¡¼¥É 1 ¤«¤é¥ì¥³¡¼¥É 4 ¤¬
|
|
¸ºß¤¹¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£¥ì¥³¡¼¥ÉÈÖ¹æ 1 ¤òºï½ü¤¹¤ë¤È¡¢¥ì¥³¡¼¥ÉÈÖ¹æ 5 ¤Ï
|
|
¥ì¥³¡¼¥ÉÈÖ¹æ 4 ¤Ë¤Ê¤ê¡¢¥ì¥³¡¼¥ÉÈÖ¹æ 1 ¤Î¸å¤í¤ò»Ø¤·¤Æ¤¤¤¿¥«¡¼¥½¥ë¤Ï¡¢
|
|
1 ¥ì¥³¡¼¥É²¼¤Ë¥·¥Õ¥È¤·¤Þ¤¹¡£
|
|
.Pp
|
|
.Fn dbopen
|
|
¤ÇÄ󶡤µ¤ì¤ë
|
|
.Nm
|
|
¤Ø¤Î¥¢¥¯¥»¥¹¼êË¡¤Ë¸Çͤʥǡ¼¥¿¹½Â¤¤Ï¡¢
|
|
.Aq Pa db.h
|
|
¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë¤Ç°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
.Bd -literal
|
|
typedef struct {
|
|
u_long flags;
|
|
u_int cachesize;
|
|
u_int psize;
|
|
int lorder;
|
|
size_t reclen;
|
|
u_char bval;
|
|
char *bfname;
|
|
} RECNOINFO;
|
|
.Ed
|
|
.Pp
|
|
¤³¤Î¹½Â¤ÂΤΥ¨¥ì¥á¥ó¥È¤Ï¡¢°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Þ¤¹¡£
|
|
.Bl -tag -width indent
|
|
.It Va flags
|
|
¥Õ¥é¥°Ãͤϡ¢°Ê²¼¤ÎÃͤÎÏÀÍýÏ (
|
|
.Em or
|
|
) ¤ò¼è¤ë¤³¤È¤Ç»ØÄꤵ¤ì¤Þ¤¹¡£
|
|
.Bl -tag -width indent
|
|
.It Dv R_FIXEDLEN
|
|
¥ì¥³¡¼¥É¤Ï¸ÇÄêĹ¤Ç¡¢¥Ð¥¤¥È¤Ç¶èÀÚ¤é¤ì¤Æ¤¤¤Þ¤»¤ó¡£
|
|
¹½Â¤ÂΤΥ¨¥ì¥á¥ó¥È
|
|
.Va reclen
|
|
¤¬¥ì¥³¡¼¥É¤ÎŤµ¤ò»ØÄꤷ¡¢¹½Â¤ÂΤΥ¨¥ì¥á¥ó¥È
|
|
.Va bval
|
|
¤¬¥Ñ¥Ã¥É¥¥ã¥é¥¯¥¿¤È¤·¤Æ»ÈÍѤµ¤ì¤Þ¤¹¡£¥Ç¡¼¥¿¥Ù¡¼¥¹¤ËÁÞÆþ¤µ¤ì¤¿
|
|
¥ì¥³¡¼¥É¤Ï¡¢
|
|
.Va reclen
|
|
¥Ð¥¤¥È¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢¼«Æ°Åª¤Ë¥Ñ¥Ã¥É¤µ¤ì¤Þ¤¹¡£
|
|
.It Dv R_NOKEY
|
|
.Fn dbopen
|
|
¤¬»ØÄꤹ¤ë¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ç¤Ï¡¢
|
|
¥·¡¼¥±¥ó¥·¥ã¥ë¥ì¥³¡¼¥É¸¡º÷¤Ç¡¢¸Æ¤Ó½Ð¤·Â¦¤Î¥¡¼¤È¥Ç¡¼¥¿¹½Â¤¤ÎξÊý¤Ë¥Ç¡¼¥¿¤¬
|
|
Æþ¤ê¤Þ¤¹¡£
|
|
.Dv R_NOKEY
|
|
¥Õ¥é¥°¤ò»ØÄꤹ¤ë¤È¡¢
|
|
.Em cursor
|
|
¥ë¡¼¥Á¥ó¤¬¤Ê¤¯¤Æ¤â¥¡¼¹½Â¤¤Ë
|
|
¥Ç¡¼¥¿¤¬Æþ¤ê¤Þ¤¹¡£¤³¤ì¤Ë¤è¤ê¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¢Ãæ´Ö¤Ë¸ºß¤¹¤ë¥ì¥³¡¼¥É
|
|
¤¹¤Ù¤Æ¤òÆɤ߹þ¤Þ¤º¤Ë¡¢¥Õ¥¡¥¤¥ë¤ÎºÇ¸å¤Î¥ì¥³¡¼¥É¤ò¼è¤ê½Ð¤»¤Þ¤¹¡£
|
|
.It Dv R_SNAPSHOT
|
|
¤³¤Î¥Õ¥é¥°¤Ï¡¢½¤Àµ¤µ¤ì¤Æ¤¤¤Ê¤¤¥ì¥³¡¼¥É¤ò
|
|
¥ª¥ê¥¸¥Ê¥ë¥Õ¥¡¥¤¥ë¤«¤éÆɤ߹þ¤àÂå¤ï¤ê¤Ë¡¢
|
|
.Fn dbopen
|
|
¤¬¸Æ¤Ó½Ð¤µ¤ì¤¿¾ì¹ç¤Ë¥Õ¥¡¥¤¥ë
|
|
¤Î¥¹¥Ê¥Ã¥×¥·¥ç¥Ã¥È¤ò¼è¤ë¤³¤È¤òÍ׵ᤷ¤Þ¤¹¡£
|
|
.El
|
|
.It Va cachesize
|
|
¥á¥â¥ê¥¥ã¥Ã¥·¥å¤ÎºÇÂ祵¥¤¥º (¥Ð¥¤¥Èñ°Ì) ¤Ç¤¹¡£¤³¤ÎÃͤÏ
|
|
.Em »²¹ÍÄøÅ٤Τâ¤Î
|
|
¤Ç¡¢¥¢¥¯¥»¥¹¼êË¡¤Ï¥¨¥é¡¼¤Ë¤Ê¤é¤º¤Ë¤³¤ì°Ê¾å¤Î¥á¥â¥ê¤ò³ä¤ê
|
|
¿¶¤ê¤Þ¤¹¡£
|
|
.Va cachesize
|
|
¤ò 0 ¤Ë¤¹¤ë¤È (¥µ¥¤¥º¤ò»ØÄꤷ¤Ê¤¤¤È)¡¢¥Ç¥Õ¥©¥ë¥È¤Î
|
|
¥¥ã¥Ã¥·¥å¤¬»ÈÍѤµ¤ì¤Þ¤¹¡£
|
|
.It Va psize
|
|
.Nm
|
|
¤Ø¤Î¥¢¥¯¥»¥¹¼êË¡¤Ï¡¢¥ì¥³¡¼¥É¤Î¥á¥â¥ê¤Î¥³¥Ô¡¼¤ò btree ¤Ë
|
|
Êݸ¤·¤Þ¤¹¡£
|
|
¤³¤ÎÃͤϡ¢¤½¤Î¥Ä¥ê¡¼¤Î¥Î¡¼¥É¤Ç»ÈÍѤµ¤ì¤ë¥Ú¡¼¥¸¤Î¥µ¥¤¥º (¥Ð¥¤¥Èñ°Ì) ¤Ç¤¹¡£
|
|
.Va psize
|
|
¤¬ 0 ¤Ç¤¢¤ë¾ì¹ç¤Ï (¥Ú¡¼¥¸¥µ¥¤¥º¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï)¡¢
|
|
´ðÁäȤʤë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Î I/O ¥Ö¥í¥Ã¥¯¥µ¥¤¥º¤Ë½¾¤Ã¤Æ
|
|
¥Ú¡¼¥¸¥µ¥¤¥º¤¬ÁªÂò¤µ¤ì¤Þ¤¹¡£¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï¡¢
|
|
.Xr btree 3
|
|
¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
|
|
.It Va lorder
|
|
Êݸ¤µ¤ì¤Æ¤¤¤ë¥Ç¡¼¥¿¥Ù¡¼¥¹¥á¥¿¥Ç¡¼¥¿¤ÎÀ°¿ô¤Î¥Ð¥¤¥È¥ª¡¼¥À
|
|
¤Ç¤¹¡£À°¿ô¤Î¥ª¡¼¥À¤ò¿ôÃͤÇɽ¸½¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤¿¤È¤¨¤Ð
|
|
¥Ó¥Ã¥°¥¨¥ó¥Ç¥£¥¢¥ó¤Î¤Ð¥Ð¥¤¥È¥ª¡¼¥À¤Ï¡¢4321 ¤Î½çÈ֤ˤʤê¤Þ¤¹¡£
|
|
.Va lorder
|
|
¤¬ 0 ¤Ç¤¢¤ë¾ì¹ç¤Ï¡¢(¥ª¡¼¥À¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï)¡¢
|
|
¸½¹Ô¥Û¥¹¥È¤Î¥ª¡¼¥À¤¬»ÈÍѤµ¤ì¤Þ¤¹¡£
|
|
.It Va reclen
|
|
¸ÇÄêĹ¥ì¥³¡¼¥É¤ÎŤµ¤Ç¤¹¡£
|
|
.It Va bval
|
|
²ÄÊÑĹ¥ì¥³¡¼¥É¤Î¾ì¹ç¤Ï¡¢¥ì¥³¡¼¥É¤Î½ª¤ï¤ê¤ò¥Þ¡¼¥¯¤¹¤ë¶èÀÚ¤ê
|
|
¥Ð¥¤¥È¤Ç¡¢¸ÇÄêĹ¥ì¥³¡¼¥É¤Î¾ì¹ç¤Ï¡¢¥Ñ¥Ã¥É¥¥ã¥é¥¯¥¿¤Ç¤¹¡£Ãͤò»ØÄꤷ¤Ê¤¤¤È¡¢
|
|
²ÄÊÑĹ¥ì¥³¡¼¥É¤ÎºÇ¸å¤Ï²þ¹Ô
|
|
.Pq Dq \en
|
|
¤Ç¥Þ¡¼¥¯¤µ¤ì¡¢
|
|
¸ÇÄêĹ¥ì¥³¡¼¥É¤Ï¥¹¥Ú¡¼¥¹¤Ç¥Ñ¥Ã¥É¤µ¤ì¤Þ¤¹¡£
|
|
.It Va bfname
|
|
.Nm
|
|
¥¢¥¯¥»¥¹¼êË¡¤Ï¡¢¥ì¥³¡¼¥É¤Î¥á¥â¥ê¤Î¥³¥Ô¡¼¤ò btree ¤ËÊݸ¤·¤Þ¤¹¡£
|
|
.Dv NULL
|
|
°Ê³°¤Î
|
|
.Va bfname
|
|
¤Ï¡¢btree ¥Õ¥¡¥¤¥ë¤Î
|
|
.Fn dbopen
|
|
¤Î
|
|
¥Õ¥¡¥¤¥ë̾¤È¤·¤Æ»ØÄꤵ¤ì¤¿¤«¤Î¤è¤¦¤Ë¡¢btree ¥Õ¥¡¥¤¥ë¤Î̾Á°¤ò»ØÄꤷ¤Þ¤¹¡£
|
|
.El
|
|
.Pp
|
|
.Nm
|
|
¤Ø¤Î¥¢¥¯¥»¥¹¼êË¡¤Ç»ÈÍѤ¹¤ë¥¡¼¤È¥Ç¡¼¥¿¤Î¥Ú¥¢¤Î¥Ç¡¼¥¿Éôʬ¤Ï¡¢¤½¤Î
|
|
¾¤Î¥¢¥¯¥»¥¹¼êË¡¤ÈƱ¤¸¤Ç¤¹¤¬¡¢¥¡¼¤Ï°Û¤Ê¤ê¤Þ¤¹¡£¥¡¼¤Î
|
|
.Va data
|
|
¥Õ¥£¡¼¥ë¥É¤Ï¡¢
|
|
.Aq Pa db.h
|
|
¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë¤ÇÄêµÁ¤µ¤ì¤¿¡¢¥¿¥¤¥×
|
|
.Ft recno_t
|
|
¤Î¥á¥â¥ê°ÌÃÖ¤ò»Ø¤¹
|
|
¥Ý¥¤¥ó¥¿¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£Ä̾ï¤Î¾ì¹ç¡¢¤³¤Î¥¿¥¤¥×¤Ï¡¢¥·¥¹¥Æ¥à¤Ç
|
|
»ÈÍѤǤ¤ëºÇÂç¤ÎÉä¹æ¤Ê¤·À°¿ô¥¿¥¤¥×¤Ç¤¹¡£¥¡¼¤Î
|
|
.Va size
|
|
¥Õ¥£¡¼¥ë¥É¤Ï¡¢¤½¤Î¥¿¥¤¥×¤Î¥µ¥¤¥º¤Ç¤¢¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
|
|
.Pp
|
|
´ðÁäȤʤë
|
|
.Nm
|
|
¥¢¥¯¥»¥¹¼êË¡¥Õ¥¡¥¤¥ë¤Ç¤Ï¡¢¥á¥¿¥Ç¡¼¥¿¤ò
|
|
´ØÏ¢ÉÕ¤±¤é¤ì¤Ê¤¤¤Î¤Ç¡¢¥Ç¥Õ¥©¥ë¥ÈÃͤËÂФ¹¤ëÊѹ¹ÆâÍÆ (¤¿¤È¤¨¤Ð¥ì¥³¡¼¥É¤Î
|
|
¸ÇÄêŤä¥Ð¥¤¥È¶èÀÚ¤êÃÍ) ¤Ï¡¢¥Õ¥¡¥¤¥ë¤ò³«¤¯¤¿¤Ó¤ËÌÀ³Î¤Ë»ØÄꤹ¤ë
|
|
ɬÍפ¬¤¢¤ê¤Þ¤¹¡£
|
|
.Pp
|
|
.Fn dbopen
|
|
¤¬»ØÄꤹ¤ë¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ç¤Ï¡¢
|
|
.Va put
|
|
¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ò»ÈÍѤ·¤Æ
|
|
¿·¤·¤¤¥ì¥³¡¼¥É¤òºîÀ®¤¹¤ë¤È¡¢¥ì¥³¡¼¥ÉÈֹ椬¡¢¸½ºß¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎºÇÂç
|
|
¥ì¥³¡¼¥É¤è¤ê 1 °Ê¾åÂ礤¤¾ì¹ç¡¢Ê£¿ô¤Î¶õ¤Î¥ì¥³¡¼¥É¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£
|
|
.Sh ¥¨¥é¡¼
|
|
.Nm
|
|
¥¢¥¯¥»¥¹¼êË¡¥ë¡¼¥Á¥ó¤¬¥¨¥é¡¼¤Ë¤Ê¤ë¤È¡¢¥é¥¤¥Ö¥é¥ê¥ë¡¼¥Á¥ó
|
|
.Xr dbopen 3
|
|
¤Ë»ØÄꤵ¤ì¤¿¥¨¥é¡¼¤«°Ê²¼¤Î¥¨¥é¡¼¤Ë
|
|
.Va errno
|
|
¤¬ÀßÄꤵ¤ì¤Þ¤¹¡£
|
|
.Bl -tag -width Er
|
|
.It Bq Er EINVAL
|
|
¸ÇÄêĹ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¡¢Â礤¹¤®¤ë¥ì¥³¡¼¥É¤ò
|
|
Äɲ䷤褦¤È¤·¤Þ¤·¤¿¡£
|
|
.El
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr btree 3 ,
|
|
.Xr dbopen 3 ,
|
|
.Xr hash 3 ,
|
|
.Xr mpool 3
|
|
.Rs
|
|
.%T "Document Processing in a Relational Database System"
|
|
.%A Michael Stonebraker
|
|
.%A Heidi Stettner
|
|
.%A Joseph Kalash
|
|
.%A Antonin Guttman
|
|
.%A Nadene Lynn
|
|
.%R "Memorandum No. UCB/ERL M82/32"
|
|
.%D May 1982
|
|
.Re
|
|
.Sh ¥Ð¥°
|
|
¥Ó¥Ã¥°¥¨¥ó¥Ç¥£¥¢¥ó¤Î¥Ð¥¤¥È¥ª¡¼¥À¤È¥ê¥È¥ë¥¨¥ó¥Ç¥£¥¢¥ó¤Î¥Ð¥¤¥È¥ª¡¼¥À¤Î¤ß
|
|
¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
|