Differences

This shows you the differences between two versions of the page.

Link to this comparison view

dev:sql:functions:retrieve_file [2011/01/25 23:57]
els created
dev:sql:functions:retrieve_file [2016/06/28 22:38]
Line 1: Line 1:
-{{page>:​top_add&​nofooter&​noeditbtn}} 
-====== Development:​ Omnidex SQL ====== 
-===== SQL Functions: $RETRIEVE_FILE ===== 
  
-==== Description ==== 
- 
-The $RETRIEVE_FILE functions opens an external textual file and returns the contents. ​ This function is most commonly used in [[admin:​indexing:​text:​home|Omnidex Text]] applications to index and query a catalog of external textual files. ​ This function can also be used to simply retrieve the contents of any textual file using an Omnidex SQL statement.  ​ 
- 
-This function returns a buffer using the datatype and length specified in the parameters. ​ If no parameters are specified, then the default datatype and length are returned. 
- 
-==== Syntax ==== 
- 
-  $RETRIEVE_FILE(filename [,'​datatype'​ [,length [,'​options'​]]]) 
- 
-=== filename === 
- 
-A string literal, a column, or an expression containing the filename to retrieve. 
- 
-=== datatype === 
- 
-The datatype to be used for retrieving the file’s content. ​ Typically a CLOB or C STRING is used to retrieve ASCII data such as text.  
- 
-Datatypes are specified in textual form, and may be used with or without lengths. ​ If no lengths are specified, then they must be included in the length parameter. ​ If no datatype is specified, then CLOB is presumed. 
- 
-=== length === 
- 
-The length to be used for retrieving the file’s content. ​ Lengths may also be specified in the datatype parameter using the standard Omnidex syntax. ​ If no length is provided in either place, the length defaults to 64KB. 
- 
-=== options === The options to be applied to retrieving this file.  ​ 
- 
-== EXTRACT_TEXT == 
- 
-Once HTML and XML are supported, this option will extract the text from the file, rather than returning the exact contents of the file. 
- 
-== AUTO_EXTENSION == 
- 
-If the passed filename does not exist, and if the passed filename does not contain an extension, and if a single file exists with this name plus an extension, the open that file.  This option allows filenames to be included without an extension as long as only one file is possible. 
- 
-== STOPWORDS = == 
- 
-Use the STOPWORDS list identified by this option. 
- 
-== PARSE == 
- 
-Parse the keywords from the text and discard all whitespace and punctuation. 
- 
-==== Example ==== 
-=== Example 1 === 
-{{page>:​bottom_add&​nofooter&​noeditbtn}} 
 
Back to top
dev/sql/functions/retrieve_file.txt · Last modified: 2016/06/28 22:38 (external edit)