Insert
INSERT creates new documents in a schema. The schema must already exist. Documents in a schema do not need to have the same fields.
INSERT INTO WordList:Language (Id, Name)
VALUES (10, 'Italian')INSERT INTO WordList:Language (Id, Name)
VALUES (11, 'Dutch'), (12, 'Finnish'), (13, 'Latin')INSERT INTO WordList:Language (Id, Name, Code)
VALUES (14, 'Swedish', Sha1('Swedish') + '-' + Guid())INSERT INTO WordList:Language
(Id: 15, Name: 'Polish'),
(Id: 16, Name: 'Czech', Code: Guid())INSERT INTO WordList:Translation (SourceWord, SourceLanguage, TargetWord, TargetLanguage)
SELECT
sw.Text as SourceWord,
sl.Name as SourceLanguage,
tw.Text as TargetWord,
tl.Name as TargetLanguage
FROM
WordList:Word as sw
INNER JOIN WordList:Language as sl
ON sl.Id = sw.LanguageId
INNER JOIN WordList:Synonym as S
ON S.SourceWordId = sw.Id
INNER JOIN WordList:Word as tw
ON tw.Id = S.TargetWordId
INNER JOIN WordList:Language as tl
ON tl.Id = tw.LanguageId
WHERE
sw.Text = 'Cat'Unique keys
Inserting a value that already exists in a unique key fails with a duplicate key violation and the whole statement is rolled back. See Create Index.Bulk loading
Applications loading many documents should use Document.StoreMany in the client API, which stores a batch of documents in one round trip.API :: Client
Using the NTDLS.Katzebase.Api client library from .NET.
Home
The home page
SQL :: Alter Index
Creates and drops indexes and unique keys.
SQL :: Attach Schema
Copies a detached schema (namespace) into the database.
SQL :: Create Index
Creates an index or a unique key to speed up queries.
SQL :: Declare
Declares a variable for the rest of a script.
SQL :: Delete
Delete removes the documents that match the given criteria.
SQL :: Detach Schema
Removes a schema (namespace) from the database and moves its files to a folder.
SQL :: DocumentID
Removed: The DocumentID() function is no longer available.
SQL :: DocumentUID
Removed: The DocumentUID() function is no longer available.