Jd/Ops create

From J Wiki
Jump to: navigation, search
Jd | Overview | General | Ops | Admin | Guide | Technical | Release | License | Support


createcol table col type
createcol table col byte [trailing-shape]
createcol table col type data
createcol table col byte [trailing-shape] data

creates new col with default values or data

NB. example createcol
jd'createtable f'
jd'createcol f a int'
jd'insert f a';12 13 14
jd'createcol f b int'
jd'createcol f d int';88 89 90
jd'reads from f'
jdaccess olddan



valid only after a dropdb creates filefolder and initial files gets lock


createtable [/a MIN MULT XTRA] table [coldefs]

createtable with 0 or more cols

each col defined by: col type [trailing-shape]

_ for trailing-shape is not valid (only in createcol with data)

string arg coldefs separated by , or LF

boxed arg coldefs in separate boxes

/a parameters are: MIN-minimum rows, MULT-multiplier, XTRA-extra rows when insert requires mapped col file resize, new size is: MIN>.>.MULT*XTRA+current_rows+new_rows

default alloc is 2000 1.5 0

NB. example createtable
jd'createtable f'
jd'createtable g a int , b byte 4'
jd'createtable h';'a int';'b byte 2'
t=: 0 : 0
a int
b byte 7
jd'createtable i ',t
jd'info schema'
jdaccess olddan


createptable table pcol

allowed pcol types: int edate edatetime date datetime

table must have 0 rows

tutorial ptable