All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.ravendb.client.documents.session.DocumentQueryHelper Maven / Gradle / Ivy

There is a newer version: 6.0.1
Show newest version
package net.ravendb.client.documents.session;

import net.ravendb.client.documents.session.tokens.CloseSubclauseToken;
import net.ravendb.client.documents.session.tokens.IntersectMarkerToken;
import net.ravendb.client.documents.session.tokens.OpenSubclauseToken;
import net.ravendb.client.documents.session.tokens.QueryToken;

public class DocumentQueryHelper {
    public static void addSpaceIfNeeded(QueryToken previousToken, QueryToken currentToken, StringBuilder writer) {
        if (previousToken == null) {
            return;
        }

        if (previousToken instanceof OpenSubclauseToken || currentToken instanceof CloseSubclauseToken || currentToken instanceof IntersectMarkerToken) {
            return;
        }
        writer.append(" ");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy