mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
Implement PostgreSQL Full Text Search++
1. Full text search supports MySQL, MariaDB, Percona and now PostgreSQL. 2. Changed SQL Variant to typed enum. 3. Changed doc.Versioned from INT to BOOL. 4. Search Reindexer now parses all documents and attachments. 5. Site meta API call returns storage provider type. 6. README prep'ed for PostgreSQL support. 7. DELETE SQL statements ignore zero rows affected. Closes #100 !!! Co-Authored-By: Saul S <sauls8t@users.noreply.github.com> Co-Authored-By: McMatts <matt@documize.com>
This commit is contained in:
parent
97beb3f4d3
commit
8a65567169
26 changed files with 274 additions and 113 deletions
|
@ -43,13 +43,24 @@ import (
|
|||
|
||||
// SetMySQLProvider creates MySQL provider
|
||||
func SetMySQLProvider(r *env.Runtime, s *store.Store) {
|
||||
// Set up provider specific details and wire up data prividers.
|
||||
r.StoreProvider = MySQLProvider{
|
||||
// Set up provider specific details.
|
||||
p := MySQLProvider{
|
||||
ConnectionString: r.Flags.DBConn,
|
||||
Variant: r.Flags.DBType,
|
||||
}
|
||||
switch r.Flags.DBType {
|
||||
case "mysql":
|
||||
p.Variant = env.StoreTypeMySQL
|
||||
case "mariadb":
|
||||
p.Variant = env.StoreTypeMariaDB
|
||||
case "percona":
|
||||
p.Variant = env.StoreTypePercona
|
||||
}
|
||||
|
||||
// Wire up data providers!
|
||||
r.StoreProvider = p
|
||||
|
||||
// Wire up data providers.
|
||||
|
||||
// Account
|
||||
accountStore := account.Store{}
|
||||
accountStore.Runtime = r
|
||||
s.Account = accountStore
|
||||
|
@ -146,7 +157,7 @@ type MySQLProvider struct {
|
|||
ConnectionString string
|
||||
|
||||
// User specified db type (mysql, percona or mariadb).
|
||||
Variant string
|
||||
Variant env.StoreType
|
||||
}
|
||||
|
||||
// Type returns name of provider
|
||||
|
@ -155,7 +166,7 @@ func (p MySQLProvider) Type() env.StoreType {
|
|||
}
|
||||
|
||||
// TypeVariant returns databse flavor
|
||||
func (p MySQLProvider) TypeVariant() string {
|
||||
func (p MySQLProvider) TypeVariant() env.StoreType {
|
||||
return p.Variant
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue