This is a search engine friendly CGI program that outputs help documents.
The LufDoc (Live User Fed Documentation) comment system will be implemented soon.

PSP Help Doc Indexer System

(Version 1.4.1)


PSP - SDS Unit Reference

Introduction

Types

SDS2/SQL Manual

SDS File Format

Procedures and Functions:

Tips and Tricks

Examples:

  • PSP_ROOT/src/examples/sdstest.pp

Introduction

    SDS (since v.2) is SQL-compliant electronic table manager with human-readable file format. It matches simple and average tasks rather well but it is not designed for complex multi-table relations. It implements basic features of SQL'92 but it has no keys, stored procedures, triggers, etc. You'd better use specialized database servers (MySQL, PostgreSQL, MSSQL, Oracle, etc.) for difficult tasks.

    SDS works with tables, not databases. Each table is a single human-readable file. If you want to learn more about SDS file format read SDS file format description. Files are locked on access which secures i/o operations. The only weak side in performance is that it can't lock and rewrite file areas, it has to rewrite whole file on INSERT, DELETE and UPDATE operations. Other sides are optimized from the point of CPU and memory usage.

    SDS implements some simple SQL'92 standards but not all of them. Common CREATE, DROP, INSERT, DELETE, UPDATE and SELECT queries are supported. It also has its own features. Read SDS2/SQL Manual to learn more about SDS queries.

Types

// Query result handle
SDS_Result = Pointer;

// Result row handle
SDS_Array = Pointer;

// Column information handle
SDS_ColumnInfo = Pointer;

Tips and Tricks

  • Use sds_escape to filter all data used in SDS queries to protect your code from SQL-injection.
  • Don't forget to free all memory your result/row/colinfo pointers allocate with sds_free_result, sds_free_row and sds_column_free.
  • Take care optimizing your queries and conditions to get less execution time.

PSP Help documents