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 | |
---|---|---|
![]() |
CPCSBaseClass |
Public Methods
Name | Description | |
---|---|---|
![]() |
Close | Closes an open record set |
![]() |
Delete | Deletes the current row |
![]() |
FieldOK | Returns true if the given field is valid for this record set |
![]() |
GetAddLink | Returns an icon linked to the add function in the admin site for this content |
![]() |
GetBoolean | Returns the field value cast as a boolean |
![]() |
GetDate | Returns the field value cast as a date |
![]() |
GetEditLink | Returns an icon linked to the edit function in the admin site for this content |
![]() |
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. |
![]() |
GetFormInput | Returns a form input element based on a content field definition |
![]() |
GetInteger | Returns the field value cast as an integer |
![]() |
GetNumber | Returns the field value cast as a number (double) |
![]() |
GetRowCount | Returns the number of rows in the result. |
![]() |
GetSQL | returns the query used to generate the results |
![]() |
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. |
![]() |
GetTextFile | Returns the filename for field types that store text in files. |
![]() |
GoFirst | Move to the first record in the current record set |
![]() |
GoNext | Move to the next record in a result set. |
![]() |
Insert | Inserts a new content row |
![]() |
OK | Returns true if there is valid data in the current row of the result set. |
![]() |
Open | Opens a record set |
![]() |
OpenGroupListUsers | Opens a record set with user records that are in a Group |
![]() |
OpenGroupUsers | Opens a record set with user records that are in any group in a list |
![]() |
OpenSQL | Opens a record set based on an sql statement |
![]() |
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. |
![]() |
SetField | Sets a value in a field of the current row. |
![]() |
SetFile | |
![]() |
SetFormInput | Processes a value from the incoming request to a field in the current row. |