CP.CS - The primary interface to the database. This object is similar to a recordset. It includes features of the content meta data. When a record is inserted, the default values of the record are available to read.


The following tables list the members exposed by CPCSBaseClass.

Public Constructors

  Name Description
Public method CPCSBaseClass  
Top

Public Methods

  Name Description
Public method Close Closes an open record set
Public method Delete Deletes the current row
Public method FieldOK Returns true if the given field is valid for this record set
Public method GetAddLink Returns an icon linked to the add function in the admin site for this content
Public method GetBoolean Returns the field value cast as a boolean
Public method GetDate Returns the field value cast as a date
Public method GetEditLink Returns an icon linked to the edit function in the admin site for this content
Public method GetFilename Returns the filename for the field, if a filename is related to the field type. Use this call to create the appropriate filename when a new file is added. The filename with the appropriate path is created or returned. This file and path is relative to the site's content file path and does not include a leading slash. To use this file in a URL, prefix with cp.site.filepath.
Public method GetFormInput Returns a form input element based on a content field definition
Public method GetInteger Returns the field value cast as an integer
Public method GetNumber Returns the field value cast as a number (double)
Public method GetRowCount Returns the number of rows in the result.
Public method GetSQL returns the query used to generate the results
Public method GetText Returns the result and converts it to a text type. For field types that store text in files, the text is returned instead of the filename. These include textfile, cssfile, javascriptfile. For file types that do not contain text, the filename is returned. These include filetype and imagefiletype.
Public method GetTextFile Returns the filename for field types that store text in files.
Public method GoFirst Move to the first record in the current record set
Public method GoNext Move to the next record in a result set.
Public method Insert Inserts a new content row
Public method OK Returns true if there is valid data in the current row of the result set.
Public method Open Opens a record set
Public method OpenGroupListUsers Opens a record set with user records that are in a Group
Public method OpenGroupUsers Opens a record set with user records that are in any group in a list
Public method OpenSQL Opens a record set based on an sql statement
Public method Save Forces a save of any changes made to the current row. A save occurs automatically when the content set is closed or when it moves to another row.
Public method SetField Sets a value in a field of the current row.
Public method SetFile  
Public method SetFormInput Processes a value from the incoming request to a field in the current row.
Top

See Also