db[.tuples|.types]-docs: replace "a SQL" with "an SQL"

factor-shell
Alexander Iljin 2017-11-02 22:10:52 +01:00 committed by John Benediktsson
parent 49665c546f
commit ef0bf15eb4
3 changed files with 14 additions and 14 deletions

View File

@ -81,7 +81,7 @@ HELP: query-results
{ $values { "query" object } { $values { "query" object }
{ "result-set" result-set } { "result-set" result-set }
} }
{ $description "Returns a " { $link result-set } " object representing the results of a SQL query. See " { $link "db-result-sets" } "." } ; { $description "Returns a " { $link result-set } " object representing the results of an SQL query. See " { $link "db-result-sets" } "." } ;
HELP: #rows HELP: #rows
{ $values { "result-set" result-set } { "n" integer } } { $values { "result-set" result-set } { "n" integer } }
@ -143,13 +143,13 @@ HELP: rollback-transaction
HELP: sql-command HELP: sql-command
{ $values { $values
{ "sql" string } } { "sql" string } }
{ $description "Executes a SQL string using the database in the " { $link db-connection } " symbol." } ; { $description "Executes an SQL string using the database in the " { $link db-connection } " symbol." } ;
HELP: sql-query HELP: sql-query
{ $values { $values
{ "sql" string } { "sql" string }
{ "rows" "an array of arrays of strings" } } { "rows" "an array of arrays of strings" } }
{ $description "Runs a SQL query of raw text in the database in the " { $link db-connection } " symbol. Each row is returned as an array of strings; no type-conversions are done on the resulting data." } ; { $description "Runs an SQL query of raw text in the database in the " { $link db-connection } " symbol. Each row is returned as an array of strings; no type-conversions are done on the resulting data." } ;
{ sql-command sql-query } related-words { sql-command sql-query } related-words
@ -217,7 +217,7 @@ $nl
} ; } ;
ARTICLE: "db-result-sets" "Result sets" ARTICLE: "db-result-sets" "Result sets"
"Result sets are the encapsulated, database-specific results from a SQL query." "Result sets are the encapsulated, database-specific results from an SQL query."
$nl $nl
"Two possible protocols for iterating over result sets exist:" "Two possible protocols for iterating over result sets exist:"
{ $subsections { $subsections
@ -266,7 +266,7 @@ ARTICLE: "db-protocol" "Low-level database protocol"
ARTICLE: "db-lowlevel-tutorial" "Low-level database tutorial" ARTICLE: "db-lowlevel-tutorial" "Low-level database tutorial"
"Although Factor makes integrating a database with its object system easy (see " { $vocab-link "db.tuples" } "), sometimes you may want to write SQL directly and get the results back as arrays of strings, for instance, when interfacing with a legacy database that doesn't easily map to " { $snippet "tuples" } "." $nl "Although Factor makes integrating a database with its object system easy (see " { $vocab-link "db.tuples" } "), sometimes you may want to write SQL directly and get the results back as arrays of strings, for instance, when interfacing with a legacy database that doesn't easily map to " { $snippet "tuples" } "." $nl
"Executing a SQL command:" "Executing an SQL command:"
{ $subsections sql-command } { $subsections sql-command }
"Executing a query directly:" "Executing a query directly:"
{ $subsections sql-query } { $subsections sql-query }

View File

@ -64,7 +64,7 @@ HELP: <update-tuple-statement>
HELP: define-persistent HELP: define-persistent
{ $values { $values
{ "class" class } { "table" string } { "columns" "an array of slot specifiers" } } { "class" class } { "table" string } { "columns" "an array of slot specifiers" } }
{ $description "Defines a relation from a Factor " { $snippet "tuple class" } " to a SQL database table name. The format for the slot specifiers is as follows:" { $description "Defines a relation from a Factor " { $snippet "tuple class" } " to an SQL database table name. The format for the slot specifiers is as follows:"
{ $list { $list
{ "a slot name from the " { $snippet "tuple class" } } { "a slot name from the " { $snippet "tuple class" } }
{ "the name of a database column that maps to the slot" } { "the name of a database column that maps to the slot" }
@ -84,17 +84,17 @@ HELP: define-persistent
HELP: create-table HELP: create-table
{ $values { $values
{ "class" class } } { "class" class } }
{ $description "Creates a SQL table from a mapping defined by " { $link define-persistent } ". If the table already exists, the database will likely throw an error." } ; { $description "Creates an SQL table from a mapping defined by " { $link define-persistent } ". If the table already exists, the database will likely throw an error." } ;
HELP: ensure-table HELP: ensure-table
{ $values { $values
{ "class" class } } { "class" class } }
{ $description "Creates a SQL table from a mapping defined by " { $link define-persistent } ". If the table already exists, the error is silently ignored." } ; { $description "Creates an SQL table from a mapping defined by " { $link define-persistent } ". If the table already exists, the error is silently ignored." } ;
HELP: ensure-tables HELP: ensure-tables
{ $values { $values
{ "classes" "a sequence of classes" } } { "classes" "a sequence of classes" } }
{ $description "Creates a SQL table from a mapping defined by " { $link define-persistent } ". If a table already exists, the error is silently ignored." } ; { $description "Creates an SQL table from a mapping defined by " { $link define-persistent } ". If a table already exists, the error is silently ignored." } ;
HELP: recreate-table HELP: recreate-table
{ $values { $values
@ -125,7 +125,7 @@ HELP: update-tuple
HELP: delete-tuples HELP: delete-tuples
{ $values { $values
{ "tuple" tuple } } { "tuple" tuple } }
{ $description "Uses the " { $snippet "tuple" } " as an exemplar object and deletes any objects that have the same slots set. If a slot is not " { $link f } ", then it is used to generate a SQL statement that deletes tuples." } { $description "Uses the " { $snippet "tuple" } " as an exemplar object and deletes any objects that have the same slots set. If a slot is not " { $link f } ", then it is used to generate an SQL statement that deletes tuples." }
{ $warning "This word will delete your data." } ; { $warning "This word will delete your data." } ;
{ insert-tuple update-tuple delete-tuples } related-words { insert-tuple update-tuple delete-tuples } related-words

View File

@ -121,24 +121,24 @@ HELP: find-primary-key
HELP: no-sql-type HELP: no-sql-type
{ $values { $values
{ "type" "a SQL type" } } { "type" "a SQL type" } }
{ $description "Throws an error containing a SQL type that is unsupported or the result of a typo." } ; { $description "Throws an error containing an SQL type that is unsupported or the result of a typo." } ;
HELP: normalize-spec HELP: normalize-spec
{ $values { $values
{ "spec" "a SQL spec" } } { "spec" "a SQL spec" } }
{ $description "Normalizes a SQL spec." } ; { $description "Normalizes an SQL spec." } ;
HELP: primary-key? HELP: primary-key?
{ $values { $values
{ "spec" "a SQL spec" } { "spec" "a SQL spec" }
{ "?" boolean } } { "?" boolean } }
{ $description "Returns true if a SQL spec is a primary key." } ; { $description "Returns true if an SQL spec is a primary key." } ;
HELP: relation? HELP: relation?
{ $values { $values
{ "spec" "a SQL spec" } { "spec" "a SQL spec" }
{ "?" boolean } } { "?" boolean } }
{ $description "Returns true if a SQL spec is a relation." } ; { $description "Returns true if an SQL spec is a relation." } ;
HELP: unknown-modifier HELP: unknown-modifier
{ $values { "modifier" string } } { $values { "modifier" string } }