2010-09-18 02:51:12 +02:00
|
|
|
/*
|
|
|
|
* This file is a part of Winix
|
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
2012-01-08 04:59:51 +01:00
|
|
|
* Copyright (c) 2010-2012, Tomasz Sowa
|
2010-09-18 02:51:12 +02:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef headerfile_winix_db_dbitemcolumns
|
|
|
|
#define headerfile_winix_db_dbitemcolumns
|
|
|
|
|
|
|
|
|
|
|
|
#include <libpq-fe.h>
|
|
|
|
#include "core/item.h"
|
2012-01-08 04:59:51 +01:00
|
|
|
#include "dbbase.h"
|
2010-09-18 02:51:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct DbItemColumns
|
|
|
|
{
|
|
|
|
int id;
|
|
|
|
int user_id;
|
|
|
|
int group_id;
|
|
|
|
int privileges;
|
|
|
|
int date_creation;
|
|
|
|
int date_modification;
|
|
|
|
int url;
|
|
|
|
int type;
|
|
|
|
int parent_id;
|
|
|
|
int content_id;
|
2011-01-05 22:24:11 +01:00
|
|
|
int link_to;
|
|
|
|
int link_redirect;
|
2010-09-18 02:51:12 +02:00
|
|
|
int subject;
|
|
|
|
int content;
|
|
|
|
int content_type;
|
|
|
|
int guest_name;
|
|
|
|
int modification_user_id;
|
|
|
|
int html_template;
|
2010-12-10 22:07:01 +01:00
|
|
|
int file_path;
|
|
|
|
int file_fs;
|
|
|
|
int file_type;
|
2010-12-11 23:55:48 +01:00
|
|
|
int has_thumb;
|
2011-06-24 22:53:21 +02:00
|
|
|
int hash;
|
|
|
|
int hash_type;
|
|
|
|
int file_size;
|
2011-01-05 22:24:11 +01:00
|
|
|
int ref;
|
|
|
|
int modify_index;
|
2011-06-24 22:53:21 +02:00
|
|
|
int sort_index;
|
2011-11-25 05:51:55 +01:00
|
|
|
int meta;
|
2010-12-11 23:55:48 +01:00
|
|
|
|
2012-01-08 04:59:51 +01:00
|
|
|
DbItemColumns(DbBase & db_base_) : db_base(db_base_)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2010-09-18 02:51:12 +02:00
|
|
|
void SetColumns(PGresult * r);
|
|
|
|
void SetItem(PGresult * r, long row, Item & item);
|
2011-11-25 05:51:55 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2012-01-08 04:59:51 +01:00
|
|
|
DbBase & db_base;
|
2011-11-25 05:51:55 +01:00
|
|
|
|
2010-09-18 02:51:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|