diff options
| author | Устюжанин Антон Александрович <ustuzhanin@tochka.com> | 2020-08-06 00:37:42 +0500 |
|---|---|---|
| committer | Устюжанин Антон Александрович <ustuzhanin@tochka.com> | 2020-08-06 00:37:42 +0500 |
| commit | b231f7bdab084683099f429631e4d1dcfb6ae7e5 (patch) | |
| tree | 8c6ef2e487d1fd79eda6351841ff90a8fb0390c2 /weed/filer2/postgres/postgres_store.go | |
| parent | a457c308ad31cfa90919fb9f430aeb9faa3b06d6 (diff) | |
| download | seaweedfs-b231f7bdab084683099f429631e4d1dcfb6ae7e5.tar.xz seaweedfs-b231f7bdab084683099f429631e4d1dcfb6ae7e5.zip | |
ListDirectoryPrefixedEntries
Diffstat (limited to 'weed/filer2/postgres/postgres_store.go')
| -rw-r--r-- | weed/filer2/postgres/postgres_store.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/filer2/postgres/postgres_store.go b/weed/filer2/postgres/postgres_store.go index 51c069aae..87eb6aca2 100644 --- a/weed/filer2/postgres/postgres_store.go +++ b/weed/filer2/postgres/postgres_store.go @@ -46,8 +46,8 @@ func (store *PostgresStore) initialize(user, password, hostname string, port int store.SqlFind = "SELECT meta FROM filemeta WHERE dirhash=$1 AND name=$2 AND directory=$3" store.SqlDelete = "DELETE FROM filemeta WHERE dirhash=$1 AND name=$2 AND directory=$3" store.SqlDeleteFolderChildren = "DELETE FROM filemeta WHERE dirhash=$1 AND directory=$2" - store.SqlListExclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=$1 AND name>$2 AND directory=$3 ORDER BY NAME ASC LIMIT $4" - store.SqlListInclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=$1 AND name>=$2 AND directory=$3 ORDER BY NAME ASC LIMIT $4" + store.SqlListExclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=$1 AND name>$2 AND directory=$3 AND name like CONCAT($4,'%')ORDER BY NAME ASC LIMIT $5" + store.SqlListInclusive = "SELECT NAME, meta FROM filemeta WHERE dirhash=$1 AND name>=$2 AND directory=$3 AND name like CONCAT($4,'%') ORDER BY NAME ASC LIMIT $5" sqlUrl := fmt.Sprintf(CONNECTION_URL_PATTERN, hostname, port, user, sslmode) if password != "" { |
