From b4250b9b6d1d0b8507d16b24a2d8b00dfe00dc20 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 28 Sep 2008 11:31:34 -0500 Subject: [PATCH] fix help lint --- basis/db/types/types-docs.factor | 23 +++++++++++++---------- basis/db/types/types.factor | 2 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/basis/db/types/types-docs.factor b/basis/db/types/types-docs.factor index 590a2e432f..401bbbc4d7 100644 --- a/basis/db/types/types-docs.factor +++ b/basis/db/types/types-docs.factor @@ -102,11 +102,11 @@ HELP: URL HELP: VARCHAR { $description "The SQL varchar type. This type can take an integer as an argument." } ; -HELP: assigned-id-spec? +HELP: user-assigned-id-spec? { $values - { "spec" null } + { "specs" "a sequence of sql specs" } { "?" "a boolean" } } -{ $description "" } ; +{ $description "Tests if any of the sql specs has the type " { $link +user-assigned-id+ } "." } ; HELP: bind# { $values @@ -126,15 +126,15 @@ HELP: compound HELP: db-assigned-id-spec? { $values - { "spec" null } + { "specs" "a sequence of sql specs" } { "?" "a boolean" } } -{ $description "" } ; +{ $description "Tests if any of the sql specs has the type " { $link +db-assigned-id+ } "." } ; HELP: find-primary-key { $values - { "specs" "an array of sql-specs" } - { "obj" object } } -{ $description "Returns the row from the sql-specs array." } + { "specs" "a sequence of sql-specs" } + { "seq" "a sequence of sql-specs" } } +{ $description "Returns the rows from the sql-specs array that are part of the primary key. Composite primary keys are supported, so this word must return a sequence." } { $notes "This is a low-level word." } ; HELP: generator-bind @@ -183,7 +183,9 @@ HELP: modifiers { $description "" } ; HELP: no-sql-type -{ $description "" } ; +{ $values + { "type" "a sql type" } } +{ $description "Throws an error containing a sql type that is unsupported or the result of a typo." } ; HELP: normalize-spec { $values @@ -250,7 +252,8 @@ HELP: sql-spec { $description "" } ; HELP: unknown-modifier -{ $description "" } ; +{ $values { "modifier" string } } +{ $description "Throws an error containing an unknown sql modifier." } ; ARTICLE: "db.types" "Database types" "The " { $vocab-link "db.types" } " vocabulary maps Factor types to database types." $nl diff --git a/basis/db/types/types.factor b/basis/db/types/types.factor index 43feed69c8..bc33792e52 100755 --- a/basis/db/types/types.factor +++ b/basis/db/types/types.factor @@ -65,7 +65,7 @@ ERROR: not-persistent class ; : db-assigned-id-spec? ( specs -- ? ) [ primary-key>> +db-assigned-id+? ] contains? ; -: assigned-id-spec? ( specs -- ? ) +: user-assigned-id-spec? ( specs -- ? ) [ primary-key>> +user-assigned-id+? ] contains? ; : normalize-spec ( spec -- )