MCPcopy
hub / github.com/cayleygraph/cayley / nodesTable

Method nodesTable

graph/sql/database.go:45–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43}
44
45func (r Registration) nodesTable() string {
46 htyp := r.HashType
47 if htyp == "" {
48 htyp = "BYTEA"
49 }
50 btyp := r.BytesType
51 if btyp == "" {
52 btyp = "BYTEA"
53 }
54 ttyp := r.TimeType
55 if ttyp == "" {
56 ttyp = "timestamp with time zone"
57 }
58 end := "\n);"
59 if r.NodesTableExtra != "" {
60 end = ",\n" + r.NodesTableExtra + end
61 }
62 return `CREATE TABLE nodes (
63 hash ` + htyp + ` PRIMARY KEY,
64 refs INT NOT NULL,
65 value ` + btyp + `,
66 value_string TEXT,
67 datatype TEXT,
68 language TEXT,
69 iri BOOLEAN,
70 bnode BOOLEAN,
71 value_int BIGINT,
72 value_bool BOOLEAN,
73 value_float double precision,
74 value_time ` + ttyp +
75 end
76}
77
78func (r Registration) quadsTable() string {
79 htyp := r.HashType

Callers 1

InitFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected