remwharead  0.9.1
Public Member Functions | Public Attributes | Friends | List of all members
remwharead::Database::entry Struct Reference

Describes a database entry. More...

#include <remwharead/sqlite.hpp>

Public Member Functions

string fulltext_oneline () const
 The full text in one line. More...
 

Public Attributes

string uri
 
string archive_uri
 
time_point datetime
 
vector< string > tags
 
string title
 
string description
 
string fulltext
 

Friends

bool operator== (const Database::entry &a, const Database::entry &b)
 Returns true if date and time are equal. More...
 

Detailed Description

Describes a database entry.

Since
0.6.0

Member Function Documentation

◆ fulltext_oneline()

string remwharead::Database::entry::fulltext_oneline ( ) const

The full text in one line.

Since
0.6.0
72 {
73  string oneline = fulltext;
74  size_t pos = 0;
75  while ((pos = oneline.find('\n', pos)) != string::npos)
76  {
77  oneline.replace(pos, 1, "\\n");
78  }
79  return oneline;
80 }

Friends And Related Function Documentation

◆ operator==

bool operator== ( const Database::entry a,
const Database::entry b 
)
friend

Returns true if date and time are equal.

Since
0.6.0
67 {
68  return (a.datetime == b.datetime);
69 }

The documentation for this struct was generated from the following files: