<commit_before>! Copyright (C) 2009 <NAME>
! See http://factorcode.org/license.txt for BSD license.
USING: assocs kernel redis sequences ;
IN: redis.assoc

INSTANCE: redis assoc

M: redis at* [ redis-get dup >boolean ] with-redis ;

M: redis assoc-size [ redis-dbsize ] with-redis ;

M: redis >alist [ "*" redis-keys dup redis-mget zip ] with-redis ;

M: redis set-at [ redis-set drop ] with-redis ;

M: redis delete-at [ redis-del drop ] with-redis ;

M: redis clear-assoc [ "*" redis-keys [ redis-del drop ] each ] with-redis ;

M: redis equal? assoc= ;

M: redis hashcode* assoc-hashcode ;
<commit_msg>redis.assoc: Use redis-flushdb in clear-assoc<commit_after>! Copyright (C) 2009 <NAME>
! See http://factorcode.org/license.txt for BSD license.
USING: assocs kernel redis sequences ;
IN: redis.assoc

INSTANCE: redis assoc

M: redis at* [ redis-get dup >boolean ] with-redis ;

M: redis assoc-size [ redis-dbsize ] with-redis ;

M: redis >alist [ "*" redis-keys dup redis-mget zip ] with-redis ;

M: redis set-at [ redis-set drop ] with-redis ;

M: redis delete-at [ redis-del drop ] with-redis ;

M: redis clear-assoc [ redis-flushdb drop ] with-redis ;

M: redis equal? assoc= ;

M: redis hashcode* assoc-hashcode ;

{'fraction_non_alphanumeric': 0.132569558101473, 'fraction_numerical': 0.006546644844517185, 'mean_word_length': 3.703846153846154, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4415335', 'n_tokens_mistral': 489, 'n_tokens_neox': 482, 'n_words': 138}