rdb.hlp

来自「eC++编译器源码」· HLP 代码 · 共 44 行

HLP
44
字号
	       =======   RDB Command Syntax   =======
compress [<rname>];                   - compress a relation file(rdbcur is default)
create <rname> <size> ( <adefs> );    - create a new relation
delete <rse> ;                        - delete tuples from 1st relation listed
diff <rname>, <rname> [<i>];          - relation difference; in 1st rel but not 2nd
exit                                  - exit RDB
export  <anames> from <rse> [<i>];    - prints comma-separated values [ into file.txt ]
extract [<rname>] [<i>];              - extract definition to a file
import [<rname>] [from <file>];       - imports file.txt of comma-separated attribute values
insert [<rname>];                     - insert tuples into a relation
iterate <anames> from <rse>  
	[groupby <anames>] [<i>];     - perform a summary query; 
				      - anames are type real except groupbys 
				      - no expression:COUNT; Bool expr:conditional count
				      - integer or real:SUM the value
join [<rname>], <rname> [<i>] ;       - join 2 relations
<MACROS>                              - any name not in the list of commands
					will be interpreted as a file.txt
					that contains a list of commands.
print  <anames> from <rse> [<i>];     - print tuples from a relation [ into file.txt ]
project [distinct] <anames> from <rse> [<i>] ;   
				      - project tuples from a relation
rename [<rname>] by <aname> <aname>;  - renames attrs; can be ,separated list of attr pairs
select                                - same as project
sort [<rname>] by <snames> ;          - sort a relation file
union [distinct] [<rname>], <rname> [<i>] ;      
				      - union 2 relations
update <anames> from <rse> ;          - update tuples within a relation

<i>             ::=     into <rname>; if omitted "rdbcur" is default.
<adefs> ::=     <name> <type> <field width>
<type>          ::=     int | char | boolean | float | or a name from any type module.
<rse>           ::=     <rnames> [where <boolean-expression>]
<rname> ::=     <a relation name>
<rnames>        ::=     <a comma separated list of <rname>s>
<aname> ::=     [<rname> .] <an attribute name> [<str>the string contains an expression]
<anames>        ::=     * | <a comma separated list of <aname>s>
<sname> ::=     <aname> { ascending | descending }
<snames>        ::=     <a comma separated list of <sname>s>
<bool-exp>      ::=     <num> <aname> <str> = < <> <= > >= () ~ | & + - * / %
			(<bool-exp>?<exp>:<exp>) same as C arithmetic IF
<num>           ::=     <digits> [ . <digits>] | <type name>"type constant"
<str>           ::=     "<chars>" | '<chars>'

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?